2024-07-05 21:55:02 +02:00
|
|
|
name: Website Dev
|
2023-12-20 18:20:00 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-07-05 21:55:02 +02:00
|
|
|
branches: [dev]
|
2023-12-20 18:20:00 +01:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
2024-07-07 17:38:07 +02:00
|
|
|
working-directory: /opt/runner/workdir/gcg-website-dev
|
2023-12-20 18:20:00 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
dev-build:
|
2024-07-07 11:21:13 +02:00
|
|
|
name: Entwicklungsumgebung
|
2023-12-20 18:20:00 +01:00
|
|
|
if: gitea.repository == 'gcg/gcg-website'
|
|
|
|
runs-on: act-runner-user
|
|
|
|
steps:
|
2024-07-05 21:55:02 +02:00
|
|
|
- name: Pull
|
2023-12-20 18:20:00 +01:00
|
|
|
run: |
|
|
|
|
git pull
|
|
|
|
git reset --hard origin/dev
|
2024-07-05 21:55:02 +02:00
|
|
|
- name: Build
|
2023-12-20 18:20:00 +01:00
|
|
|
run: |
|
|
|
|
rm -rf dev
|
|
|
|
hugo --minify --gc --baseURL "https://dev.cantorgymnasium.de/" --buildDrafts --buildFuture -d dev
|
2024-07-05 21:55:02 +02:00
|
|
|
- name: Deploy
|
2023-12-20 18:20:00 +01:00
|
|
|
run: |
|
|
|
|
cd dev
|
|
|
|
pagefind_extended --site=.
|
|
|
|
rsync -azr --delete ./ /opt/data/webdata/gcg-website-dev/
|
2024-07-05 21:55:02 +02:00
|
|
|
- name: Notification
|
2023-12-20 18:20:00 +01:00
|
|
|
uses: actions/telegram-action@main
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
chat_id: ${{ secrets.TG_CHAT_ID }}
|
|
|
|
token: ${{ secrets.TG_TOKEN }}
|