1
1
mirror of https://github.com/primer/css.git synced 2024-12-28 00:24:36 +03:00
css/.github/workflows/deploy_production.yml
dependabot[bot] 13dd110ae6
Bump actions/checkout from 2 to 3 (#2050)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-03 12:11:22 -07:00

47 lines
1.2 KiB
YAML

name: Deploy
on:
push:
branches:
- 'main'
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@v3
- 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@main
with:
node_version: 14
install: yarn && cd docs && yarn && cd ..
build: yarn build:docs
output_dir: docs/public