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

50 lines
1.4 KiB
YAML
Raw Normal View History

2023-03-21 15:06:09 +01:00
name: deploy to production
2023-03-23 17:52:30 +01:00
on: "push"
# push:
# branches:
# - master
2023-03-21 15:06:09 +01:00
jobs:
deploy:
2023-03-23 16:57:26 +01:00
name: deploy
2023-03-21 15:06:09 +01:00
runs-on: ubuntu-latest
2023-03-23 17:38:32 +01:00
container:
2023-03-23 18:22:43 +01:00
image: catthehacker/ubuntu:js-latest
2023-03-23 17:38:32 +01:00
volumes:
- /data:/data
2023-03-21 15:06:09 +01:00
steps:
2023-03-23 16:44:40 +01:00
- uses: actions/checkout@v3
with:
fetch-depth: 0
2023-03-23 18:19:03 +01:00
lfs: true
submodules: true
2023-03-23 17:57:45 +01:00
- run: |
git fetch --force --tags
2023-03-23 17:52:30 +01:00
- name: build docs
env:
FORCE_COLOR: "true"
run: |
2023-03-23 17:57:45 +01:00
node --version
2023-03-23 17:52:30 +01:00
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}:./ \