use working directory path
All checks were successful
schuelerzeitung-prod / prod-build (push) Successful in 5s
schuelerzeitung-prod / test-build (push) Successful in 1s

This commit is contained in:
Denys Konovalov 2023-10-21 21:10:05 +02:00
parent 90fdf9e4de
commit ab0bbb11a9

@ -5,6 +5,10 @@ on:
branches:
- main
defaults:
run:
working-directory: /opt/data/actions/schuelerzeitung-main
jobs:
prod-build:
if: gitea.repository == 'gcg/schuelerzeitung'
@ -13,17 +17,15 @@ jobs:
steps:
- name: pull
run: |
cd /opt/data/actions/schuelerzeitung-main
git fetch --all
git reset --hard origin/main
- name: build
run: |
cd /opt/data/actions/schuelerzeitung-main
rm -rf public
hugo --minify --gc --baseURL "https://schuelerzeitung-gcg.de/"
- name: deploy
run: |
cd /opt/data/actions/schuelerzeitung-main/public
cd public
rsync -azr --delete ./ /opt/data/webdata/schuelerzeitung/
- name: notification
uses: actions/telegram-action@main
@ -38,15 +40,13 @@ jobs:
steps:
- name: pull
run: |
cd /opt/data/actions/schuelerzeitung-main
git fetch --all
git reset --hard origin/main
- name: build
run: |
cd /opt/data/actions/schuelerzeitung-main
rm -rf test
hugo --minify --gc --baseURL "https://test.schuelerzeitung-gcg.de/" --buildDrafts --buildFuture -d test
- name: deploy
run: |
cd /opt/data/actions/schuelerzeitung-main/test
cd test
rsync -azr --delete ./ /opt/data/webdata/schuelerzeitung-test/