Skip to content

changed service name in prod compose #37

changed service name in prod compose

changed service name in prod compose #37

Workflow file for this run

name: deploy
on:
workflow_dispatch:
workflow_run:
workflows: ["build"]
types:
- completed
push:
branches:
- main
paths:
- "stack/**"
jobs:
deploy:
name: Deploy to production
runs-on: self-hosted
environment: prod
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Setting up Stack
run: |
mkdir -p $PROJECT_PATH
cp -f ./stack/prod.compose.yml $PROJECT_PATH/docker-compose.yml
echo "$ENV_CONTENT" > $PROJECT_PATH/.env
env:
PROJECT_PATH: ${{ secrets.PROJECT_PATH }}
ENV_CONTENT: ${{ secrets.ENV_CONTENT }}
-
name: Pull changes and restart
run: |
cd ${{ secrets.PROJECT_PATH }}
docker compose down --remove-orphans
docker compose pull
docker compose up -d