.gitea/workflows/prod.yaml aktualisiert
This commit is contained in:
parent
51dbac2138
commit
6cc0a5d461
@ -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 * * *'
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: /opt/data/actions/gcg-website-master
|
working-directory: /opt/runner/workdir/gcg-website-master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prod-build:
|
prod-build:
|
||||||
if: gitea.repository == 'gcg/gcg-website'
|
if: gitea.repository == 'gcg/gcg-website'
|
||||||
runs-on: act-runner-user
|
runs-on: act-runner-user
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: pull
|
- name: pull
|
||||||
run: |
|
run: |
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
rm -rf public
|
rm -rf public
|
||||||
hugo --minify --gc --baseURL "https://cantorgymnasium.de/"
|
hugo --minify --gc --baseURL "https://cantorgymnasium.de/"
|
||||||
- name: deploy
|
- name: deploy
|
||||||
run: |
|
run: |
|
||||||
cd public
|
cd public
|
||||||
pagefind_extended --site=.
|
pagefind_extended --site=.
|
||||||
rsync -azr --delete ./ /opt/data/webdata/gcg-website/
|
rsync -azr --delete ./ /opt/data/webdata/gcg-website/
|
||||||
- name: notification
|
- name: notification
|
||||||
uses: actions/telegram-action@main
|
uses: actions/telegram-action@main
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
chat_id: ${{ secrets.TG_CHAT_ID }}
|
chat_id: ${{ secrets.TG_CHAT_ID }}
|
||||||
token: ${{ secrets.TG_TOKEN }}
|
token: ${{ secrets.TG_TOKEN }}
|
||||||
test-build:
|
test-build:
|
||||||
if: gitea.repository == 'gcg/gcg-website'
|
if: gitea.repository == 'gcg/gcg-website'
|
||||||
runs-on: act-runner-user
|
runs-on: act-runner-user
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: pull
|
- name: pull
|
||||||
run: |
|
run: |
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
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 test
|
cd test
|
||||||
rsync -azr --delete ./ /opt/data/webdata/gcg-website-test/
|
rsync -azr --delete ./ /opt/data/webdata/gcg-website-test/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user