2024-03-02 00:26:27 +00:00
|
|
|
---
|
2024-03-02 17:41:05 +00:00
|
|
|
name: build and deploy
|
2024-03-02 00:26:27 +00:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
2024-03-02 21:09:49 +00:00
|
|
|
build+deploy:
|
2024-03-02 00:26:27 +00:00
|
|
|
runs-on: site-builder
|
|
|
|
steps:
|
2024-03-02 21:38:44 +00:00
|
|
|
- name: Pull del repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Installazione dipendenze sito
|
|
|
|
run: /venv/bin/pip install -r requirements.txt
|
|
|
|
- name: Compilazione del sito
|
|
|
|
run: /venv/bin/pelican content -s publishconf.py
|
|
|
|
- name: Trasferimento del sito
|
|
|
|
uses: burnett01/rsync-deployments@6.0.0
|
2024-03-02 17:41:05 +00:00
|
|
|
with:
|
2024-03-02 21:22:13 +00:00
|
|
|
switches: -avz --delete
|
2024-03-02 17:41:05 +00:00
|
|
|
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
|
2024-03-02 21:38:44 +00:00
|
|
|
- name: Sistemazione permessi
|
|
|
|
uses: appleboy/ssh-action@v1.0.3
|
2024-03-02 17:41:05 +00:00
|
|
|
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
|