Fix local links from docs to Storybook (#624) #450
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
# Storybook is deployed to a separate repo (primer/brand-storybook) | |
# This job dispatches a build request there | |
dispatch-storybook-build: | |
if: ${{ github.repository == 'primer/brand' }} | |
name: Prod Storybook build notifier | |
runs-on: ubuntu-latest | |
steps: | |
- name: Issue build request | |
run: | | |
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{secrets.STAFF_STORYBOOK_DEPLOYMENT_PAT}}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/primer/brand-storybook/dispatches -d '{"event_type":"deploy_docs"}' | |
build_deploy: | |
if: ${{ github.repository == 'primer/brand' }} | |
name: Production | |
# SHA for security hardening. Points at last verified HEAD of main branch. | |
uses: primer/.github/.github/workflows/deploy.yml@rezrah/fix-prod-deployment | |
with: | |
node_version: 18 | |
install: npm ci --legacy-peer-deps && cd apps/docs && npm ci --legacy-peer-deps && cd .. | |
build: npm run build:lib && npm run build:docs | |
output_dir: apps/docs/public/ |