2023-03-18 16:51:52 +01:00
|
|
|
name: website-main
|
2023-03-13 21:56:03 +01:00
|
|
|
|
|
|
|
on:
|
2023-03-18 16:54:53 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2023-03-18 20:41:40 +01:00
|
|
|
issue_comment:
|
2023-04-03 12:05:18 +02:00
|
|
|
types: [created]
|
2023-03-18 14:58:36 +01:00
|
|
|
|
|
|
|
concurrency:
|
2023-04-03 12:05:18 +02:00
|
|
|
group: ${{ gitea.workflow }}-${{ gitea.ref }}
|
2023-03-18 14:58:36 +01:00
|
|
|
cancel-in-progress: true
|
2023-03-13 21:56:03 +01:00
|
|
|
|
|
|
|
jobs:
|
2023-03-18 16:51:52 +01:00
|
|
|
prod-build:
|
2023-04-03 12:05:18 +02:00
|
|
|
if: gitea.repository == 'gcg/gcg-website' && gitea.event_name == 'push'
|
2023-03-18 14:44:34 +01:00
|
|
|
runs-on: act-runner-user
|
2023-03-18 16:51:52 +01:00
|
|
|
timeout-minutes: 5
|
2023-03-13 21:56:03 +01:00
|
|
|
steps:
|
|
|
|
- name: clone
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: build
|
|
|
|
run: hugo --minify --gc --baseURL "https://cantorgymnasium.de/"
|
|
|
|
- name: deploy
|
2023-03-18 14:44:34 +01:00
|
|
|
run: |
|
2023-03-18 14:49:41 +01:00
|
|
|
cd public
|
2023-03-18 14:44:34 +01:00
|
|
|
pagefind --source=.
|
2023-03-18 15:01:49 +01:00
|
|
|
rsync -azr --delete ./ /opt/data/webdata/gcg-website/
|
2023-03-13 21:56:03 +01:00
|
|
|
- name: notification
|
2023-04-03 12:05:18 +02:00
|
|
|
uses: actions/telegram-action@main
|
2023-03-13 21:56:03 +01:00
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
chat_id: ${{ secrets.TG_CHAT_ID }}
|
2023-03-18 16:51:52 +01:00
|
|
|
token: ${{ secrets.TG_TOKEN }}
|
|
|
|
include_commit_info: false
|
|
|
|
test-build:
|
2023-04-03 12:05:18 +02:00
|
|
|
if: gitea.repository == 'gcg/gcg-website' && gitea.event_name == 'push'
|
2023-03-18 16:51:52 +01:00
|
|
|
runs-on: act-runner-user
|
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: clone
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: build
|
2023-03-18 16:57:47 +01:00
|
|
|
run: hugo --minify --gc --baseURL "https://test.cantorgymnasium.de/" --buildDrafts --buildFuture -d test
|
2023-03-18 16:51:52 +01:00
|
|
|
- name: deploy
|
|
|
|
run: |
|
|
|
|
cd test
|
|
|
|
pagefind --source=.
|
2023-03-18 20:41:40 +01:00
|
|
|
rsync -azr --delete ./ /opt/data/webdata/gcg-website-test/
|
|
|
|
auto-rebuild:
|
2023-04-03 12:05:18 +02:00
|
|
|
if: gitea.repository == 'gcg/gcg-website' && gitea.event.issue.number == 219
|
2023-03-18 20:41:40 +01:00
|
|
|
runs-on: act-runner-user
|
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: clone
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: build
|
|
|
|
run: hugo --minify --gc --baseURL "https://cantorgymnasium.de/"
|
|
|
|
- name: deploy
|
|
|
|
run: |
|
|
|
|
cd public
|
|
|
|
pagefind --source=.
|
2023-03-26 17:08:24 +02:00
|
|
|
rsync -azr --delete ./ /opt/data/webdata/gcg-website/
|