Skip to content

Commit

Permalink
Merge pull request #708 from kitsuyui/update-github-pages-workflow
Browse files Browse the repository at this point in the history
Update github pages workflow
  • Loading branch information
kitsuyui authored Jan 9, 2025
2 parents c8f6310 + 3d8cba4 commit 46ae3c0
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Publish Storybook
name: Publish Storybook and Typedoc

on:
push:
branches:
- main
- typedoc

jobs:
deploy_storybook:
name: Publish Storybook
build:
name: Build docs
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -19,7 +18,8 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20.x
# https://nodejs.org/en/about/previous-releases
node-version: 22.x

- run: pnpm install

Expand All @@ -32,8 +32,24 @@ jobs:
mv ./examples/storybook/storybook-static ./build/sites/storybook
mv ./build/typedocs ./build/sites/typedocs
- uses: peaceiris/actions-gh-pages@v4
- uses: actions/upload-pages-artifact@v3
id: deployment
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/sites
cname: react-playground.docs.kitsuyui.com
path: ./build/sites

deploy:
name: Deploy docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write

steps:
# https://github.com/actions/deploy-pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 46ae3c0

Please sign in to comment.