Repository navigation
Select Ask AI video previews from published media links #453
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: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - prod | |
| # Review gh actions docs if you want to further define triggers, paths, etc | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: docs-production | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| env: | |
| PHCODE_VIDEO_PUBLICATIONS_FILE: .tutorial-video-publications.json | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Test tutorial release tooling | |
| run: npm run test:tutorials | |
| - name: Test link verification | |
| run: npm run test:links | |
| - name: Test search links and DocSearch fixes | |
| run: npm run test:search | |
| - name: Package tutorial projects | |
| run: npm run package:tutorials | |
| - name: Restore original video publication dates | |
| run: node scripts/prepare-tutorial-publications.cjs | |
| - name: Build website | |
| run: npm run build | |
| env: | |
| PHCODE_PUBLISH_TUTORIAL_VIDEOS: '1' | |
| - name: Verify tutorial release files and metadata | |
| run: npm run verify:tutorials -- --release | |
| - name: copy cname to build folder | |
| run: cp CNAME ./build | |
| # Popular action to deploy to GitHub Pages: | |
| # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # Build output to publish to the `gh-pages` branch: | |
| publish_dir: ./build | |
| # The following lines assign commit authorship to the official | |
| # GH-Actions bot for deploys to `gh-pages` branch: | |
| # https://github.com/actions/checkout/issues/13#issuecomment-724415212 | |
| # The GH actions bot is used by default if you didn't specify the two fields. | |
| # You can swap them out with your own user credentials. | |
| user_name: github-actions[bot] | |
| user_email: 41898282+github-actions[bot]@users.noreply.github.com |