Skip to content

Commit

Permalink
attempting to update build and deploy storybook workflow with new act…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
georgewrmarshall committed Feb 1, 2024
1 parent cbb2654 commit 1371482
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/build-deploy-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,24 @@ jobs:
permissions:
contents: write
runs-on: ubuntu-latest
environment: github-pages
steps:
- uses: actions/checkout@v2
- name: Checkout the repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
# We check out the pull request's base branch, which will be
# used as the base branch for all git operations.
ref: ${{ github.event.pull_request.base.ref }}
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install npm dependencies
run: yarn --immutable
- name: Run build script
run: yarn build:storybook
- name: Deploy to `storybook-static` directory of `gh-pages` branch
uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- run: yarn
- uses: MetaMask/action-publish-gh-pages@v2
with:
build-command: build:storybook
source-directory: storybook-static
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This `PUBLISH_DOCS_TOKEN` needs to be manually set per-repository.
# Look in the repository settings under "Environments", and set this token in the `github-pages` environment.
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
destination_dir: storybook-static

0 comments on commit 1371482

Please sign in to comment.