Vamos usar a biblioteca Storybook Deployer para otimizar nosso processo de publicação
Criado o arquivo deploy-docs.yml par configurar a pipeline/rotina de deploy do storbook
name: Deploy docs
# the pipe will be run everytime that master branch has a push
on:
push:
branches:
- master
# define steps of pipeline
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout # do checkout to get the code
uses: actions/checkout@v4
- name: Setup Node.js # install node
uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci # do npm install (made by ci environment, what will isnt modify the package-lock, this is important!)
- run: npm run build # run turborepo build
- name: Deploy storybook # do deploy
working-directory: ./packages/docs # enter on storybook folder
run: touch storybook-static/.nojekyll && npm run deploy-storybook -- --ci --existing-output-dir=storybook-static # run deploy command
env:
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
Publicando StoryBook
Vamos usar a biblioteca Storybook Deployer para otimizar nosso processo de publicação
Criado o arquivo deploy-docs.yml par configurar a pipeline/rotina de deploy do storbook
Precisei utilizar as issues Erro ao visualizar a página publicada do storybook e Erro no deploy do Storybook url retorna erro 403 para deixar o deploy redondinho
Também teve a configuração do GH Pages para gerar a pipe de hospedagem