1
1
mirror of https://github.com/primer/css.git synced 2024-09-20 13:17:29 +03:00
css/.github/workflows/deploy_production.yml
2021-04-06 21:53:07 -07:00

34 lines
995 B
YAML

name: Deploy
on:
push:
branches:
- main
paths:
- 'src/**'
- 'docs/**'
- '.github/workflows/deploy*.yml'
- 'package.json'
jobs:
deploy:
if: ${{ github.repository == 'primer/css' }}
name: Production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Check the number of changeset files, if it's 0 we deploy
- id: changeset-count
run: echo "::set-output name=CHANGE_COUNT::$(ls .changeset/*.md | grep -v README | wc -l | xargs)"
- if: ${{ steps.changeset-count.outputs.CHANGE_COUNT == 0 }}
name: Vercel Action
uses: amondnet/vercel-action@v20
id: vercel-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN_SHARED }}
vercel-args: '--prod'
github-comment: false
vercel-org-id: ${{ secrets.VERCEL_ORG_ID_SHARED }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}