From 82ef46a48dbedb75b299ee8110572da8b3ffea5e Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Tue, 9 Apr 2024 14:12:41 +0000 Subject: [PATCH] deploy reverted --- .../{deploy.yaml => deploy.yaml.robin} | 1 + .gitea/workflows/deploy.yml | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+) rename .gitea/workflows/{deploy.yaml => deploy.yaml.robin} (99%) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml.robin similarity index 99% rename from .gitea/workflows/deploy.yaml rename to .gitea/workflows/deploy.yaml.robin index 462bfa7..e1fc459 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml.robin @@ -237,6 +237,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + lfs: true - name: setup node 18 uses: actions/setup-node@v3 diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..eb4f2b5 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,58 @@ +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 + npm install -g yarn + 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}:./ \