wm-fontis-tibi-2023/.gitea/workflows/deploy.yaml

57 lines
1.6 KiB
YAML
Raw Normal View History

2023-07-13 13:12:19 +02:00
name: deploy to production
on: "push"
# push:
# branches:
# - master
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
container:
image: gitbase.de/actions/ubuntu:latest
volumes:
- /data:/data
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
submodules: true
- run: |
git fetch --force --tags
# setup node 18
- name: setup node 18
uses: actions/setup-node@v3
with:
node-version: 18
- 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
ls -la
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}:./ \