From 97d6252182dfdaa2f3feadc7217331c737c3d3ee Mon Sep 17 00:00:00 2001 From: Andrea Stagi Date: Tue, 9 Apr 2024 14:09:56 +0200 Subject: [PATCH] chore(ci): add action to update docs --- .github/workflows/update-docs.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/update-docs.yml diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml new file mode 100644 index 00000000..f4b80dc0 --- /dev/null +++ b/.github/workflows/update-docs.yml @@ -0,0 +1,33 @@ +name: Update documentation + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Git config + run: | + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + - name: Install dependencies + run: yarn + - name: Build documentation + run: | + yarn build + - name: Publish on gh-pages + run: | + git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git + yarn storybook:build + yarn storybook:deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}