Skip to content

.prod

.prod #14

name: Production deploy
on:
push:
branches: [prod]
workflow_dispatch:
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Echo info
run: |
echo "Started deploying..."
- name: checkout repo
uses: actions/checkout@v4
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_JWT_SECRET: ${{ secrets.JWT_SECRET }}
envkey_POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
envkey_POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
envkey_POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }}
envkey_POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }}
envkey_POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
file_name: .prod.env
directory: "./"
fail_on_empty: false
sort_keys: false
- name: pull images
run: docker-compose -f docker-compose.prod.yml pull
- name: restart containers
run: docker-compose -f docker-compose.prod.yml up -d