.gitea/workflows/prod.yml aktualisiert
This commit is contained in:
parent
71de6c766d
commit
b93a743492
@ -1,9 +1,8 @@
|
|||||||
name: schuelerzeitung-prod
|
name: Schülerzeitung Prod/Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -11,9 +10,9 @@ defaults:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prod-build:
|
prod-build:
|
||||||
|
name: Produktivumgebung
|
||||||
if: gitea.repository == 'gcg/schuelerzeitung'
|
if: gitea.repository == 'gcg/schuelerzeitung'
|
||||||
runs-on: act-runner-user
|
runs-on: act-runner-user
|
||||||
timeout-minutes: 5
|
|
||||||
steps:
|
steps:
|
||||||
- name: Pull
|
- name: Pull
|
||||||
run: |
|
run: |
|
||||||
@ -27,13 +26,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd public
|
cd public
|
||||||
rsync -azr --delete ./ /opt/data/webdata/schuelerzeitung/
|
rsync -azr --delete ./ /opt/data/webdata/schuelerzeitung/
|
||||||
- name: Telegram notification
|
- name: Notification (GCG.IT Administration)
|
||||||
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 }}
|
||||||
- name: Telegram notification
|
- name: Notification (Schülerzeitung)
|
||||||
uses: actions/telegram-action@main
|
uses: actions/telegram-action@main
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
@ -41,19 +40,19 @@ jobs:
|
|||||||
token: ${{ secrets.TG_TOKEN }}
|
token: ${{ secrets.TG_TOKEN }}
|
||||||
|
|
||||||
test-build:
|
test-build:
|
||||||
|
name: Testumgebung
|
||||||
if: gitea.repository == 'gcg/schuelerzeitung'
|
if: gitea.repository == 'gcg/schuelerzeitung'
|
||||||
runs-on: act-runner-user
|
runs-on: act-runner-user
|
||||||
timeout-minutes: 5
|
|
||||||
steps:
|
steps:
|
||||||
- name: pull
|
- name: Pull
|
||||||
run: |
|
run: |
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git reset --hard origin/main
|
git reset --hard origin/main
|
||||||
- name: build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
rm -rf test
|
rm -rf test
|
||||||
hugo --minify --gc --baseURL "https://test.schuelerzeitung-gcg.de/" --buildDrafts --buildFuture -d test
|
hugo --minify --gc --baseURL "https://test.schuelerzeitung-gcg.de/" --buildDrafts --buildFuture -d test
|
||||||
- name: deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
cd test
|
cd test
|
||||||
rsync -azr --delete ./ /opt/data/webdata/schuelerzeitung-test/
|
rsync -azr --delete ./ /opt/data/webdata/schuelerzeitung-test/
|
Loading…
x
Reference in New Issue
Block a user