From ff7451ec3381ec8a893a036c72d7532b564bf37d Mon Sep 17 00:00:00 2001 From: Arjan van Wijk Date: Tue, 14 Dec 2021 21:02:04 +0100 Subject: [PATCH] Move GH pages deploy to workflow --- .github/workflows/update-docs.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 3e6e60c..ad7b029 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -2,8 +2,7 @@ name: Update Docs on: push: - branches: - - main + branches: [main] jobs: update-docs: @@ -12,6 +11,8 @@ jobs: steps: - name: Check out source uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v2 @@ -22,6 +23,13 @@ jobs: - name: Install npm packages run: npm ci - - name: Build & Deploy Storybook Docs - run: | - npm run storybook:deploy + - name: Build Storybook Docs + run: npm run storybook:build + + - name: Deploy to GitHub Pages + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: .docs/dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}