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}:./ \