This commit is contained in:
parent
0e185d172a
commit
6886c6c42d
2 changed files with 23 additions and 12 deletions
23
.forgejo/workflows/cicd.yaml
Normal file
23
.forgejo/workflows/cicd.yaml
Normal file
|
@ -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/
|
|
@ -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
|
|
Loading…
Reference in a new issue