Repository navigation
Build the web client in CI instead of on EC2 #19
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: CI/CD Pipeline | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| types: [opened, synchronize, reopened, closed] | |
| jobs: | |
| # Run tests on PRs (not on merge) | |
| test-api: | |
| if: github.event.action != 'closed' | |
| uses: ./.github/workflows/test-cloud-services.yml | |
| with: | |
| python_version: '3.11' | |
| test-web: | |
| if: github.event.action != 'closed' | |
| uses: ./.github/workflows/test-web-client.yml | |
| with: | |
| node_version: '20' | |
| test-hub: | |
| if: github.event.action != 'closed' | |
| uses: ./.github/workflows/test-rpi-hub-server.yml | |
| with: | |
| python_version: '3.11' | |
| test-uplink: | |
| if: github.event.action != 'closed' | |
| uses: ./.github/workflows/test-uplink-manager.yml | |
| with: | |
| python_version: '3.11' | |
| # Deploy when PR is merged to main | |
| deploy: | |
| if: github.event.pull_request.merged == true && github.event.action == 'closed' | |
| needs: [test-api, test-web] | |
| uses: ./.github/workflows/deploy.yml | |
| with: | |
| branch: 'main' | |
| repo_base_dir: '/home/ubuntu' | |
| secrets: inherit |