Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/deploy-guide.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy Guide to GitHub Pages

on:
push:
branches:
- main
paths:
- 'guide/**'
- '.github/workflows/deploy-guide.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
container: node
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
working-directory: guide
run: npm ci

- name: Build guide
working-directory: guide
run: npm run build

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: guide/_book

deploy:
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@v4
1 change: 1 addition & 0 deletions guide/.bookignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.js
*.json
!book.json
*.mjs
*.cjs
2 changes: 2 additions & 0 deletions guide/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* [Migrating context-local variables](05-cjs-esm-migration/migrating-context-local-variables/README.md)
* [Migrating package.json](05-cjs-esm-migration/migrating-package-json/README.md)

<!--
### Packages with a build step

* [Bundling](06-bundling/README.md)
Expand All @@ -38,3 +39,4 @@

* [Q&A](q-n-a/README.md)
* [Troubleshooting](troubleshooting/README.md)
* -->