Skip to content

ci: trigger pages build (telemetry + deploy) #5

ci: trigger pages build (telemetry + deploy)

ci: trigger pages build (telemetry + deploy) #5

Workflow file for this run

name: Deploy GitHub Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
# Manual trigger
workflow_dispatch:
# Optional: run when using GitHub merge queue
merge_group:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build and Upload Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Summarize build
run: |
echo "# Build Summary" >> $GITHUB_STEP_SUMMARY
echo "Event: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
echo "Ref: ${{ github.ref }}" >> $GITHUB_STEP_SUMMARY
echo "Commit: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
- name: Disable Jekyll
run: echo > .nojekyll
# No bundling needed; publish repo root
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: .
report-build-status:
name: Report Build Status
needs: build
runs-on: ubuntu-latest
steps:
- name: Report build status to Pages telemetry
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh --version
gh api -X POST "repos/$GITHUB_REPOSITORY/pages/telemetry"
deploy:
name: Deploy to Pages
needs: [build, report-build-status]
# Do not deploy for pull_request events; only push/main, merge_group, dispatch
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4