From 51d1d2a6577b2d88427e771a1184f0e0b7cc893a Mon Sep 17 00:00:00 2001 From: "Fabian T. Ecke" Date: Wed, 10 Jul 2024 15:36:23 +0200 Subject: [PATCH] =?UTF-8?q?.gitea/workflows/publish.yml=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/publish.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..6c6b878 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,37 @@ +name: Website + +on: + push: + branches: [main] + +defaults: + run: + working-directory: /opt/runner/workdir/FTE-Homepage + +jobs: + publish: + name: Website veröffentlichen + if: gitea.repository == 'fte/FTE-Homepage' + runs-on: act-runner + steps: + - name: Pull + run: | + git fetch --all + git reset --hard origin/main + - name: NPM install + run: | + npm i + - name: Build + run: | + rm -rf public + hugo --minify --gc + - name: Deploy + run: | + cd public + rsync -azr --delete ./ /var/www/html/www.ftecke.de/ + # - name: Notification + # uses: actions/telegram-action@main + # if: always() + # with: + # chat_id: ${{ secrets.TG_CHAT_ID }} + # token: ${{ secrets.TG_TOKEN }}