Skip to content

[Testimonial] Site refactor updates #2464

[Testimonial] Site refactor updates

[Testimonial] Site refactor updates #2464

name: Deploy
on:
pull_request:
permissions:
checks: write
contents: read
deployments: write
pages: write
id-token: write
jobs:
deploy:
if: ${{ github.repository == 'primer/brand' }}
name: Preview
# SHA for security hardening. Points at last verified HEAD of main branch.
uses: primer/.github/.github/workflows/deploy_preview.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 && npm run build:docs:preview && npm run build:storybook:preview
output_dir: apps/docs/public/
deploy-storybook:
if: ${{ github.repository == 'primer/brand' }}
name: Preview Storybook
runs-on:
labels: ubuntu-latest-16-cores
needs: deploy
steps:
- uses: actions/checkout@v3
- uses: chrnorm/[email protected]
name: Create GitHub deployment for storybook
id: storybook
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: Preview Storybook
target_url: '${{ needs.deploy.outputs.deployment_url }}storybook'
- name: Update storybook deployment status (success)
if: success()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment_url: '${{ needs.deploy.outputs.deployment_url }}storybook'
target_url: '${{ needs.deploy.outputs.deployment_url }}storybook'
state: 'success'
deployment_id: ${{ steps.storybook.outputs.deployment_id }}
- name: Update storybook deployment status (failure)
if: failure()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: 'failure'
deployment_id: ${{ steps.storybook.outputs.deployment_id }}