Skip to content

Merge pull request #191 from TEAM-SAMSION/PET-278 #7

Merge pull request #191 from TEAM-SAMSION/PET-278

Merge pull request #191 from TEAM-SAMSION/PET-278 #7

Workflow file for this run

name: Nginx-CD-prod
on:
push:
branches:
- release
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: nginx.conf push
uses: appleboy/scp-action@master
with:
host: ${{ secrets.PROD_HOST }}
username: ubuntu
key: ${{ secrets.PROD_KEY }}
source: "./.deploy/nginx/conf-prod/nginx.conf"
target: "/home/ubuntu/nginx/conf"
strip_components: 4
- name: docker-compose-nginx push
uses: appleboy/scp-action@master
with:
host: ${{ secrets.PROD_HOST }}
username: ubuntu
key: ${{ secrets.PROD_KEY }}
source: "./.deploy/nginx/docker-compose.yml"
target: "/home/ubuntu/nginx"
strip_components: 3
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.PROD_HOST }}
username: ubuntu
key: ${{ secrets.PROD_KEY }}
script: |
cd nginx
docker-compose up -d
docker image prune -f