fix: auto inject cfl styles #691
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: Main | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**/*.md' | |
| pull_request: | |
| issues: | |
| issue_comment: | |
| workflow_dispatch: | |
| jobs: | |
| issue: | |
| uses: ocadotechnology/codeforlife-workspace/.github/workflows/issues.yaml@main | |
| secrets: inherit | |
| contributor: | |
| uses: ocadotechnology/codeforlife-contributor-backend/.github/workflows/check-pr-authors-signed-latest-agreement.yaml@main | |
| test: | |
| uses: ocadotechnology/codeforlife-workspace/.github/workflows/test-javascript-code.yaml@main | |
| secrets: inherit | |
| with: | |
| node-version: 22 | |
| build: | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| outputs: | |
| sha: ${{ steps.push-dist-files.outputs.sha }} | |
| steps: | |
| - name: 🌐 Set up JavaScript 22 Environment | |
| uses: ocadotechnology/codeforlife-workspace/.github/actions/javascript/setup-environment@main | |
| with: | |
| node-version: 22 | |
| install-prod: false | |
| gh-token: ${{ secrets.CFL_BOT_GH_TOKEN }} | |
| - name: 🏗️ Build Dist Files | |
| run: yarn run vite build | |
| - name: 📤 Push Dist Files | |
| id: push-dist-files | |
| uses: ocadotechnology/codeforlife-workspace/.github/actions/git/add-commit-push@main | |
| with: | |
| add: dist | |
| commit-message: "built distribution files" | |
| release: | |
| needs: [build] # TODO: add contributor | |
| concurrency: release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # to enable use of OIDC for npm provenance | |
| # Release if: | |
| # - the repo's owner is Ocado Tech. | |
| # - a change is made to the default branch. | |
| if: | | |
| github.repository_owner_id == 2088731 && | |
| github.ref_name == github.event.repository.default_branch | |
| steps: | |
| - name: 🚀 Publish Semantic Release | |
| uses: ocadotechnology/codeforlife-workspace/.github/actions/github/release@main | |
| with: | |
| ref: ${{ needs.build.outputs.sha }} | |
| cfl-bot-gh-token: ${{ secrets.CFL_BOT_GH_TOKEN }} | |
| npm-token: ${{ secrets.NPM_TOKEN }} | |
| monitor: | |
| uses: ocadotechnology/codeforlife-workspace/.github/workflows/monitor-javascript-release.yaml@main | |
| secrets: inherit | |
| needs: [release] | |
| with: | |
| node-version: 22 | |
| submodule: | |
| uses: ocadotechnology/codeforlife-workspace/.github/workflows/gitmodules.yaml@main | |
| secrets: inherit | |
| needs: [release] |