.prod #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |