Skip to content

Bump path-to-regexp and express in /docs (#2753) #999

Bump path-to-regexp and express in /docs (#2753)

Bump path-to-regexp and express in /docs (#2753) #999

name: Deploy
on:
push:
branches:
- 'main'
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
deployments: write
issues: write
statuses: write
checks: write
jobs:
guard:
name: Guard
runs-on: ubuntu-latest
outputs:
# To avoid deploying documentation for unrelease changes, we check the number of changeset files.
# If it's 0, we deploy.
should_deploy: ${{ steps.changeset-count.outputs.change_count == 0 }}
steps:
- uses: actions/checkout@v4
- id: changeset-count
run: echo "::set-output name=change_count::$(ls .changeset/*.md | grep -v README | wc -l | xargs)"
# Log changeset count for debugging purposes
- name: Log changeset count
run: echo ${{ steps.changeset-count.outputs.change_count }}
# Log guard output for debugging purposes
- name: Log guard output
run: echo ${{ needs.guard.outputs.should_deploy }}
deploy:
if: ${{ github.repository == 'primer/css' }}
name: Production
needs: [guard]
uses: primer/.github/.github/workflows/deploy.yml@v2.1.1
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}
with:
node_version: 20
install: npm i && cd docs && npm i && cd ..
build: npm run build:docs
output_dir: docs/public