blog/.forgejo/workflows/cicd.yaml

27 lines
694 B
YAML
Raw Normal View History

2024-11-25 21:51:45 +00:00
---
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
2024-11-25 21:57:15 +00:00
container:
image: forge.cfebs.com/cfebs/node-util:20
2024-11-25 21:51:45 +00:00
steps:
2024-11-25 22:05:10 +00:00
- name: food
run: echo food
2024-11-25 21:51:45 +00:00
- 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 }}")
2024-11-25 21:52:46 +00:00
rsync -r --delete -v --rsh="ssh -o StrictHostKeyChecking=no" -r ./public/ $DEPLOY_REMOTE:/home/www-cfebscom/public/