feat: add event details and resources for Kafka through the lens of .… #56
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
| # Three-stage workflow: Build → Test → Deploy | |
| # Build: builds Jekyll site and uploads artifact | |
| # Test: runs Playwright tests, uploads results, never fails the pipeline | |
| # Deploy: deploys to GitHub Pages (skipped on pull requests) | |
| name: Build, Test and Deploy Jekyll site to Pages | |
| on: | |
| push: | |
| branches: ["master"] | |
| pull_request: | |
| branches: ["master"] | |
| workflow_dispatch: | |
| inputs: | |
| update_snapshots: | |
| description: 'Update Playwright snapshots' | |
| required: false | |
| default: false | |
| type: boolean | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| # Stage 1: Build - builds the Jekyll site and uploads the pages artifact | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build with Jekyll in devcontainer | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| push: never | |
| runCmd: | | |
| bundle install | |
| bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | |
| env: | |
| JEKYLL_ENV: production | |
| - name: Upload pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| # Stage 2: Test - runs Playwright tests, uploads results, never fails | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| continue-on-error: true | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build devcontainer | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| imageName: dotnetdevs-austria-devcontainer | |
| cacheFrom: dotnetdevs-austria-devcontainer | |
| push: never | |
| runCmd: | | |
| echo "📦 Installing dependencies..." | |
| bundle install | |
| npm ci | |
| npx playwright install --with-deps chromium | |
| - name: Run Playwright tests in devcontainer | |
| if: ${{ !inputs.update_snapshots }} | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| imageName: dotnetdevs-austria-devcontainer | |
| cacheFrom: dotnetdevs-austria-devcontainer | |
| push: never | |
| runCmd: | | |
| npm run test:ci | |
| env: | |
| BASE_URL: http://127.0.0.1:4000 | |
| - name: Update Playwright Snapshots in devcontainer | |
| if: ${{ inputs.update_snapshots }} | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| imageName: dotnetdevs-austria-devcontainer | |
| cacheFrom: dotnetdevs-austria-devcontainer | |
| push: never | |
| runCmd: | | |
| bundle exec jekyll build | |
| npx playwright test --update-snapshots | |
| env: | |
| BASE_URL: http://127.0.0.1:4000 | |
| - name: Upload Playwright Report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: test-results/ | |
| retention-days: 7 | |
| - name: Upload Updated Snapshots | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ inputs.update_snapshots }} | |
| with: | |
| name: updated-snapshots | |
| path: | | |
| tests/**/*.png | |
| tests/**/*.txt | |
| retention-days: 7 | |
| # Stage 3: Deploy - deploys to GitHub Pages (skipped on pull requests) | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: [build, test] | |
| if: github.event_name != 'pull_request' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |