refactor: Update GitHub Pages deployment workflow to include authenti… #26
This file contains 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: Build and Publish to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install & build | |
run: | | |
gh auth login --with-token < ${{github.token}} | |
npm i | |
npm run deploy |