.gitea/workflows/prod.yml aktualisiert
This commit is contained in:
parent
874acfe720
commit
15b7e5bd2b
@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: /opt/data/actions/schuelerzeitung-main
|
working-directory: /opt/runner/workdir/schuelerzeitung-main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prod-build:
|
prod-build:
|
||||||
@ -15,24 +15,30 @@ jobs:
|
|||||||
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/main
|
git reset --hard origin/main
|
||||||
- name: build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
rm -rf public
|
rm -rf public
|
||||||
hugo --minify --gc --baseURL "https://schuelerzeitung-gcg.de/"
|
hugo --minify --gc --baseURL "https://schuelerzeitung-gcg.de/"
|
||||||
- name: deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
cd public
|
cd public
|
||||||
rsync -azr --delete ./ /opt/data/webdata/schuelerzeitung/
|
rsync -azr --delete ./ /opt/data/webdata/schuelerzeitung/
|
||||||
- name: notification
|
- name: Telegram 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 }}
|
||||||
|
|
||||||
|
- name: Discord notification
|
||||||
|
uses: https://github.com/PingChunChung/actions-discord-notifier
|
||||||
|
with:
|
||||||
|
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
|
||||||
test-build:
|
test-build:
|
||||||
if: gitea.repository == 'gcg/schuelerzeitung'
|
if: gitea.repository == 'gcg/schuelerzeitung'
|
||||||
runs-on: act-runner-user
|
runs-on: act-runner-user
|
||||||
|
Loading…
x
Reference in New Issue
Block a user