tibi-docs/.gitea/workflows/deploy.yaml

49 lines
1.4 KiB
YAML

name: deploy to production
on: "push"
# push:
# branches:
# - master
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
volumes:
- /data:/data
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
git fetch --force --tags
git lfs pull
- name: build docs
env:
FORCE_COLOR: "true"
run: |
node --version
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}:./ \