From ab0bbb11a9b2ff910a253feb95ae40d28cc29a10 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sat, 21 Oct 2023 21:10:05 +0200 Subject: [PATCH] use working directory path --- .gitea/workflows/prod.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/prod.yml b/.gitea/workflows/prod.yml index 4ffe6d2..13d70eb 100644 --- a/.gitea/workflows/prod.yml +++ b/.gitea/workflows/prod.yml @@ -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/ \ No newline at end of file