Skip to content

pulizia

pulizia #4

Workflow file for this run

name: Production deployment
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build:
permissions:
contents: read
packages: write
uses: ./.github/workflows/build.yml
deployment:
runs-on: ubuntu-latest
environment: prod
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Copy docker compose
run:
cp ./deploy/docker-compose.yaml ./docker-compose.yaml
shell: bash
- name: copy files to target server via scp
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
port: 22
key: ${{ secrets.DEPLOY_KEY }}
source: "./docker-compose.yaml"
target: "/var/gallery/"
- name: Run docker compose
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_KEY }}
port: 22
script: docker compose -f /var/gallery/docker-compose.yaml up -d