From 9fe87f1a49da5f6f560208f10d795a0e2795148b Mon Sep 17 00:00:00 2001 From: Collin Lefeber Date: Mon, 25 Nov 2024 16:51:45 -0500 Subject: [PATCH] add forgejo cicd --- .forgejo/workflows/cicd.yaml | 23 +++++++++++++++++++++++ .gitlab-ci.yml | 12 ------------ 2 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 .forgejo/workflows/cicd.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.forgejo/workflows/cicd.yaml b/.forgejo/workflows/cicd.yaml new file mode 100644 index 0000000..9399647 --- /dev/null +++ b/.forgejo/workflows/cicd.yaml @@ -0,0 +1,23 @@ +--- +env: + DEPLOY_REMOTE: www-cfebscom@cfebs.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 --delete -v --rsh="ssh -o StrictHostKeyChecking=no" -r ./public/ $DEPLOY_REMOTE:/home/www-cfebscom/public/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 6114565..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -default: - image: alpine:3.20 - -deploy-pages: - script: - - 'apk add python3 py3-markdown' - - python3 ./main.py - pages: true - artifacts: - paths: - - public