Sistemati workflow?

This commit is contained in:
Emiliano Vavassori 2024-03-02 18:41:05 +01:00
parent 8a68fb931e
commit 01d7c160ed
2 changed files with 25 additions and 12 deletions

View File

@ -0,0 +1,8 @@
---
name: show settings
on: [push]
jobs:
show_settings:
runs-on: site-builder
steps:
- run: echo ${{ gitea.workspace }}

View File

@ -1,8 +1,8 @@
---
name: Build and Deploy
name: build and deploy
on: [push]
jobs:
Build:
build:
runs-on: site-builder
steps:
- run: git clone ${{ gitea.repository }}
@ -12,13 +12,18 @@ jobs:
Deploy:
runs-on: debian-bookworm
steps:
- uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SOURCE: output/
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
TARGET: /var/www/conference
SCRIPT_AFTER: |
sudo chown -R root:www-data /var/www/conference
- 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