fix workflow file #5
This file contains hidden or 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
| # .github/workflows/deploy.yml | |
| name: Build and Deploy | |
| on: | |
| push: | |
| branches: [master] | |
| jobs: | |
| build-and-deploy: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Free Docker space | |
| run: docker image prune -f | |
| - name: Build images | |
| run: docker compose build --parallel 1 | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| COMPOSE_DOCKER_CLI_BUILD: 1 | |
| - name: Stop old containers | |
| run: docker compose down | |
| - name: Start new containers | |
| run: | | |
| docker compose up -d |