Bump nanoid from 3.3.6 to 3.3.8 in /docs (#2751) #998
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: 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/[email protected] | |
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 |