From 261b77e5cac40459135c45cf8c34e36e9eae1bc7 Mon Sep 17 00:00:00 2001 From: erlendmiljo Date: Wed, 22 Jun 2022 15:22:31 +0200 Subject: [PATCH] Update README.md Add documentation on using storybook-deployer to deploy on GitHub Pages --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 2764f32..ba97ddf 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,18 @@ Or if your access token is stored in the `GITHUB_TOKEN` environment variable npm run deploy-storybook -- --ci --host-token-env-variable=GITHUB_TOKEN ``` +### Deploying Storybook to GitHub Pages as part of a GitHub Action + +If you are deploying Storybook to GitHub Pages from a repository belonging to an organization account on GitHub, you may need to specify a ```${{ github.actor }}``` in addition to the ```${{ secrets.GITHUB_TOKEN }}``` for your build step to be able to authenticate properly. + +For instance: +``` +- name: Deploy storybook to GitHub Pages + run: npm run deploy-storybook -- --ci + env: + GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} +``` + ### Custom deploy configuration If you want to customize Git username, email or commit message, add this to `package.json`: