conference-site/.gitea/workflows/build-deploy.yml
Emiliano Vavassori 01d7c160ed
Some checks failed
build and deploy / build (push) Failing after 3s
build and deploy / Deploy (push) Failing after 10s
show settings / show_settings (push) Failing after 4s
Sistemati workflow?
2024-03-02 18:41:05 +01:00

30 lines
982 B
YAML

---
name: build and deploy
on: [push]
jobs:
build:
runs-on: site-builder
steps:
- run: git clone ${{ gitea.repository }}
- run: /app/venv/bin/pip install -r conference-site/requirements.txt
- run: /app/venv/bin/pelican conference-site/content -o output -s publishconf.py
Deploy:
runs-on: debian-bookworm
steps:
- uses: burnett01/rsync-deployments@6.0.0
with:
path: output/
remote_host: ${{ secrets.REMOTE_HOST }}
remote_port: ${{ secrets.REMOTE_PORT }}
remote_user: ${{ secrets.REMOTE_USER }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}
remote_path: /var/www/conference
- uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.REMOTE_HOST }}
port: ${{ secrets.REMOTE_PORT }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: sudo chown -R root:www-data /var/www/conference