Update pages.yml #262
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: Deploy HonKit to GitHub Pages | |
on: | |
push: | |
branches: ["master"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
timeout-minutes: 5 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' # Using Node.js v18 | |
timeout-minutes: 5 | |
- name: Install npm Dependencies | |
run: npm install | |
timeout-minutes: 5 | |
- name: Build HonKit | |
run: npm run build | |
timeout-minutes: 30 | |
- name: Configure GitHub Pages | |
id: pages | |
uses: actions/configure-pages@v3 | |
timeout-minutes: 10 | |
- name: Upload GitHub Pages Artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: './_book' | |
timeout-minutes: 10 | |
deploy: | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v3 |