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:
|
|
|
|
types: [created, edited, deleted]
|
2023-03-18 14:58:36 +01:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2023-03-13 21:56:03 +01:00
|
|
|
|
|
|
|
jobs:
|
2023-03-18 16:51:52 +01:00
|
|
|
prod-build:
|
2023-03-18 20:49:24 +01:00
|
|
|
if: github.repository == 'gcg/gcg-website' && github.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
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: setup hugo
|
|
|
|
uses: https://github.com/peaceiris/actions-hugo@v2
|
|
|
|
with:
|
2023-03-18 14:45:25 +01:00
|
|
|
hugo-version: '0.111.2'
|
2023-03-13 21:56:03 +01:00
|
|
|
extended: true
|
|
|
|
|
|
|
|
- name: build
|
|
|
|
run: hugo --minify --gc --baseURL "https://cantorgymnasium.de/"
|
2023-03-15 20:45:51 +01:00
|
|
|
|
2023-03-13 21:56:03 +01:00
|
|
|
- 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
|
|
|
|
uses: https://github.com/yamaks2306/telegram-notification@main
|
|
|
|
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-03-18 20:49:24 +01:00
|
|
|
if: github.repository == 'gcg/gcg-website' && github.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
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: setup hugo
|
|
|
|
uses: https://github.com/peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
hugo-version: '0.111.2'
|
|
|
|
extended: true
|
|
|
|
|
|
|
|
- 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:
|
|
|
|
if: github.repository == 'gcg/gcg-website' && github.event.issue.number == 219
|
|
|
|
runs-on: act-runner-user
|
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: clone
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: setup hugo
|
|
|
|
uses: https://github.com/peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
hugo-version: '0.111.2'
|
|
|
|
extended: true
|
|
|
|
|
|
|
|
- name: build
|
|
|
|
run: hugo --minify --gc --baseURL "https://cantorgymnasium.de/"
|
|
|
|
|
|
|
|
- name: deploy
|
|
|
|
run: |
|
|
|
|
cd public
|
|
|
|
pagefind --source=.
|
2023-03-20 11:16:41 +01:00
|
|
|
rsync -azr --delete ./ /opt/data/webdata/gcg-website/
|