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: Deploy Dev Environment | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: self-hosted | |
| env: | |
| COMPOSE_FILE: 'docker-compose.dev.yml' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Load environment variables | |
| uses: falti/dotenv-action@v1.1.4 | |
| with: | |
| export-variables: true | |
| keys-case: bypass | |
| - name: Stop existing containers | |
| run: docker compose -f $COMPOSE_FILE down | |
| - name: Build and run updated containers | |
| run: docker compose -f $COMPOSE_FILE up --force-recreate --build -d | |
| - name: Verify running containers | |
| run: docker ps |