ci(pages): restrict deploy-pages workflow to push and workflow_dispatch; remove id-token from permissions

This commit is contained in:
adrian adewunmi 2026-07-14 08:01:36 +01:00
parent 0b3a28c7c3
commit a865f9830c
1 changed files with 38 additions and 0 deletions

38
.github/workflows/deploy-pages.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Deploy GitHub Pages
on:
push:
branches:
- main
workflow_dispatch: {}
permissions:
contents: read
pages: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4