Update pages.yml #245
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 | |
uses: actions/checkout@v4 | |
timeout-minutes: 5 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
timeout-minutes: 5 | |
- name: Install HonKit | |
run: npm install -g honkit | |
timeout-minutes: 5 | |
- name: Install HonKit plugins | |
run: honkit install || true | |
timeout-minutes: 5 | |
- name: Build HonKit | |
run: honkit build . ./_book | |
timeout-minutes: 5 | |
- name: Configure GitHub Pages | |
id: pages | |
uses: actions/configure-pages@v3 | |
timeout-minutes: 5 | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: './_book' | |
timeout-minutes: 5 | |
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 |