-
Notifications
You must be signed in to change notification settings - Fork 37
35 lines (31 loc) · 1.19 KB
/
deploy_docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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@0cec9b9914f358846163f2428663b58da41028c9
with:
node_version: 16
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/