Merge pull request #1108 from nguyenthanhan/fix/crawlers-energy-displ… #1
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
| name: Deploy Main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| DEPLOY_DIR: /opt/main | |
| jobs: | |
| deploy: | |
| name: Deploy to main.ogamex.dev | |
| runs-on: [self-hosted, ctogx] | |
| concurrency: | |
| group: deploy-main | |
| cancel-in-progress: true | |
| environment: | |
| name: main | |
| url: https://main.ogamex.dev | |
| steps: | |
| - name: Pull latest changes | |
| working-directory: ${{ env.DEPLOY_DIR }} | |
| run: git pull | |
| - name: Build and start stack | |
| working-directory: ${{ env.DEPLOY_DIR }} | |
| run: docker compose -f docker-compose.prod.yml up -d --build --force-recreate --remove-orphans | |
| - name: Prune old Docker build artifacts | |
| run: docker system prune -af | |
| - name: Output deployment info | |
| run: | | |
| echo "::notice::Deployed main branch to https://main.ogamex.dev" | |
| echo "Commit: ${{ github.sha }}" |