Repository navigation
Publish Copilot CLI and configuration primitives independently #20
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: Validate Slide Builds (PR) | |
| on: | |
| pull_request: | |
| paths: | |
| - "slides/**" | |
| - "tech-talks/**" | |
| - ".github/workflows/pr-validate-slides.yml" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pr-slides-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| name: Build Changed Slides | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "24" | |
| cache: npm | |
| cache-dependency-path: slides/package-lock.json | |
| - name: Detect changed slides | |
| id: changes | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| run: node slides/scripts/detect-slide-changes.mjs "$BASE_SHA" "$HEAD_SHA" | |
| - name: Test deck selection | |
| run: node --test slides/scripts/native-decks.test.mjs slides/scripts/detect-slide-changes.test.mjs | |
| - name: Install dependencies | |
| if: steps.changes.outputs.changed_slides != '' || steps.changes.outputs.changed_native != '' || steps.changes.outputs.full_rebuild == 'true' || steps.changes.outputs.full_native == 'true' | |
| working-directory: ./slides | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| if: steps.changes.outputs.changed_slides != '' || steps.changes.outputs.changed_native != '' || steps.changes.outputs.full_rebuild == 'true' || steps.changes.outputs.full_native == 'true' | |
| working-directory: ./slides | |
| run: npx playwright install chromium --with-deps | |
| - name: Build changed Slidev decks | |
| if: steps.changes.outputs.full_rebuild != 'true' && steps.changes.outputs.changed_slides != '' | |
| working-directory: ./slides | |
| env: | |
| CHANGED_SLIDES: ${{ steps.changes.outputs.changed_slides }} | |
| run: | | |
| while IFS= read -r SLIDE_FILE; do | |
| [ -n "$SLIDE_FILE" ] || continue | |
| CATEGORY=$(dirname "$SLIDE_FILE") | |
| BASENAME=$(basename "$SLIDE_FILE" .md) | |
| npx slidev build "$SLIDE_FILE" \ | |
| --base "/CopilotTraining/${CATEGORY}/${BASENAME}/" \ | |
| --out "$(pwd)/dist/${CATEGORY}/${BASENAME}" | |
| done <<< "$CHANGED_SLIDES" | |
| - name: Build all decks (shared Slidev files changed) | |
| if: steps.changes.outputs.full_rebuild == 'true' | |
| working-directory: ./slides | |
| run: bash scripts/build-all.sh | |
| - name: Validate and build native decks | |
| if: steps.changes.outputs.full_rebuild != 'true' && (steps.changes.outputs.changed_native != '' || steps.changes.outputs.full_native == 'true') | |
| working-directory: ./slides | |
| env: | |
| FULL_NATIVE: ${{ steps.changes.outputs.full_native }} | |
| CHANGED_NATIVE: ${{ steps.changes.outputs.changed_native }} | |
| run: | | |
| if [ "$FULL_NATIVE" = "true" ]; then | |
| node scripts/build-native-decks.mjs | |
| else | |
| while IFS= read -r SLUG; do | |
| [ -n "$SLUG" ] || continue | |
| node scripts/build-native-decks.mjs --deck "$SLUG" | |
| done <<< "$CHANGED_NATIVE" | |
| fi | |
| - name: Check catalog metadata | |
| run: node slides/scripts/sync-index-dates.mjs --check |