feat(#222): advertise the feed for auto-discovery #247
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/CD | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| # Superseded runs of the same ref are pointless — they test a commit that has | |
| # already been replaced. Cancelling here is safe: job-level concurrency cannot | |
| # reach the deploy job, so a Pages deploy in flight is never interrupted. | |
| concurrency: | |
| group: test-${{ github.ref }} | |
| cancel-in-progress: true | |
| # This job runs third-party code (npm ci, browser downloads) on every pull | |
| # request, so it gets no deploy credentials — only what configure-pages needs | |
| # to read the Pages base path. | |
| permissions: | |
| contents: read | |
| pages: read | |
| env: | |
| JEKYLL_ENV: production | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '4.0' | |
| bundler-cache: true | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v6 | |
| - name: Build with Jekyll | |
| run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22' | |
| - name: Install Playwright | |
| working-directory: ./playwright | |
| run: | | |
| npm ci | |
| npx playwright install --with-deps chromium | |
| - name: Start Jekyll server | |
| run: | | |
| bundle exec jekyll serve --host 0.0.0.0 --port 4000 \ | |
| --detach --skip-initial-build --no-watch | |
| curl --retry 10 --retry-delay 3 --retry-connrefused http://0.0.0.0:4000/ | |
| - name: Run E2E tests | |
| working-directory: ./playwright | |
| run: npm test | |
| - name: Upload test report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report | |
| path: playwright/playwright-report/ | |
| retention-days: 30 | |
| - name: Upload Pages artifact | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/upload-pages-artifact@v5 | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/master' | |
| needs: test | |
| runs-on: ubuntu-latest | |
| # GitHub Pages allows one deployment at a time, and a deploy must never be | |
| # cancelled midway — so deploys queue, and only against other deploys. | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: false | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |