diff --git a/.forgejo/workflows/cicd.yaml b/.forgejo/workflows/cicd.yaml new file mode 100644 index 0000000..af2320e --- /dev/null +++ b/.forgejo/workflows/cicd.yaml @@ -0,0 +1,23 @@ +--- +env: + DEPLOY_REMOTE: www-cfebscom@tennishtz2.slowdiiv.com + +on: [push] +jobs: + build: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: docker + container: + image: forge.cfebs.com/cfebs/node-util:20 + steps: + - name: checkout + uses: https://code.forgejo.org/actions/checkout@v4 + + - name: build + run: python3 ./main.py + + - name: deploy + run: | + eval $(ssh-agent -s) + ssh-add <(echo "${{ secrets.FORGE_DEPLOY_PRIVATE_KEY }}") + rsync -r -v --rsh="ssh -o StrictHostKeyChecking=no" -r ./public/ $DEPLOY_REMOTE:/home/www-cfebscom/public/