Added a deploy step
/ build (push) Successful in 20s Details
/ deploy (push) Successful in 54s Details

This commit is contained in:
Sebastian 2023-08-06 16:42:10 +02:00
parent b0d0734d99
commit dc03cb14dc
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
on:
push:
branches:
- main
jobs:
deploy:
runs-on: docker
container:
image: forgejo.zenerdio.de/sebastian/c3space-website-ci:v0.1.0
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
virtenv
cache
output
key: c3space-nikola-${{ github.ref_name }}
- run: python3 -m venv virtenv
- run: . virtenv/bin/activate; pip install -r requirements.txt
- run: . virtenv/bin/activate; nikola build
- run: echo "${{ secrets.DEPLOY_KEY }}" > id_rsa_deploy; chmod 600 id_rsa_deploy
- run: cd output; echo "cd public_html\nput -r ." | sftp -i ../id_rsa_deploy -o StrictHostKeyChecking=no c3space@zero-gravitas.zenerdio.de