.gitea/workflows/prod.yaml aktualisiert
All checks were successful
website-main / prod-build (push) Successful in 1m6s
website-main / test-build (push) Successful in 37s

This commit is contained in:
Denys Konovalov 2023-10-21 21:19:44 +02:00
parent e1e29c570d
commit 9537bd604c

@ -1,55 +1,55 @@
name: website-main name: website-main
on: on:
push: push:
branches: branches:
- master - master
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
jobs: defaults:
prod-build: run:
if: gitea.repository == 'gcg/gcg-website' working-directory: /opt/data/actions/gcg-website-master
runs-on: act-runner-user
timeout-minutes: 5 jobs:
steps: prod-build:
- name: pull if: gitea.repository == 'gcg/gcg-website'
run: | runs-on: act-runner-user
cd /opt/data/actions/gcg-website-master timeout-minutes: 5
git fetch --all steps:
git reset --hard origin/master - name: pull
- name: build run: |
run: | git fetch --all
cd /opt/data/actions/gcg-website-master git reset --hard origin/master
rm -rf public - name: build
hugo --minify --gc --baseURL "https://cantorgymnasium.de/" run: |
- name: deploy rm -rf public
run: | hugo --minify --gc --baseURL "https://cantorgymnasium.de/"
cd /opt/data/actions/gcg-website-master/public - name: deploy
pagefind_extended --site=. run: |
rsync -azr --delete ./ /opt/data/webdata/gcg-website/ cd public
- name: notification pagefind_extended --site=.
uses: actions/telegram-action@main rsync -azr --delete ./ /opt/data/webdata/gcg-website/
if: always() - name: notification
with: uses: actions/telegram-action@main
chat_id: ${{ secrets.TG_CHAT_ID }} if: always()
token: ${{ secrets.TG_TOKEN }} with:
test-build: chat_id: ${{ secrets.TG_CHAT_ID }}
if: gitea.repository == 'gcg/gcg-website' token: ${{ secrets.TG_TOKEN }}
runs-on: act-runner-user test-build:
timeout-minutes: 5 if: gitea.repository == 'gcg/gcg-website'
steps: runs-on: act-runner-user
- name: pull timeout-minutes: 5
run: | steps:
cd /opt/data/actions/gcg-website-master - name: pull
git fetch --all run: |
git reset --hard origin/master git fetch --all
- name: build git reset --hard origin/master
run: | - name: build
cd /opt/data/actions/gcg-website-master run: |
rm -rf test rm -rf test
hugo --minify --gc --baseURL "https://test.cantorgymnasium.de/" --buildDrafts --buildFuture -d test hugo --minify --gc --baseURL "https://test.cantorgymnasium.de/" --buildDrafts --buildFuture -d test
- name: deploy - name: deploy
run: | run: |
cd /opt/data/actions/gcg-website-master/test cd test
rsync -azr --delete ./ /opt/data/webdata/gcg-website-test/ rsync -azr --delete ./ /opt/data/webdata/gcg-website-test/