From 66e40c5f1601b6afca2342256a8d3a6eec48f03a Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Thu, 23 Mar 2023 16:52:30 +0000 Subject: [PATCH] test gitea actions --- .gitea/workflows/deploy.yaml | 38 +++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index c055043..4b0d430 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,9 +1,9 @@ name: deploy to production -on: - push: - branches: - - master +on: "push" +# push: +# branches: +# - master jobs: deploy: @@ -18,8 +18,28 @@ jobs: with: fetch-depth: 0 - run: git fetch --force --tags - - run: hostname - - run: pwd - - run: ls -la - - run: docker ps - - run: ls -la /data + + - name: build docs + env: + FORCE_COLOR: "true" + run: | + cd docs + yarn install + yarn docpress:build + + - name: deploy docs + # only if branch is master + if: github.ref == 'refs/heads/master' + env: + RSYNC_HOST: ftp1.webmakers.de + RSYNC_PORT: 22222 + RSYNC_USER: webmakers_tibi_docs_rsync_master + RSYNC_PASS: ${{ secrets.rsync_master }} + run: | + cd docs + + echo rsync -rlcgD --perms -i -u -v --stats --progress \ + --delete \ + -e "sshpass -p ${RSYNC_PASS} ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p ${RSYNC_PORT}" \ + _docpress/ \ + ${RSYNC_USER}@${RSYNC_HOST}:./ \