Refactor Header: use LogoMark and LinkButton #40
Workflow file for this run
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 | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| quality: | |
| runs-on: [self-hosted, linux, x64, t31-project2-ci] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: { node-version-file: .node-version, cache: npm } | |
| - run: npm ci | |
| - name: Verify generated GraphQL types | |
| run: npm run types:check | |
| - name: Verify database migrations | |
| run: npm run db:check | |
| - name: Lint, typecheck, test and build | |
| run: npm run check | |
| - run: npx playwright install chromium | |
| - run: npm run test:e2e | |
| - name: Save tested release | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-artifact@v3.2.1-node20 | |
| with: | |
| name: project2-${{ github.sha }}-${{ github.run_attempt }} | |
| path: | | |
| apps/api/dist | |
| apps/api/migrations | |
| apps/api/package.json | |
| apps/web/dist | |
| apps/web/package.json | |
| package.json | |
| package-lock.json | |
| deploy: | |
| needs: quality | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: [self-hosted, linux, x64, t31-project2-deploy] | |
| environment: | |
| name: production | |
| url: http://it2810-31.idi.ntnu.no/project2/ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v3-node20 | |
| with: | |
| name: project2-${{ github.sha }}-${{ github.run_attempt }} | |
| path: release | |
| - name: Install production dependencies | |
| run: cd release && npm ci --omit=dev | |
| - name: Apply database migrations | |
| run: cd release && node --env-file=/etc/t31-project2.env apps/api/dist/db/migrate.js | |
| - name: Publish and restart the API service | |
| run: bash scripts/deploy.sh release "$GITHUB_SHA-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT" |