mirror of
https://github.com/primer/css.git
synced 2024-12-03 03:33:40 +03:00
34 lines
995 B
YAML
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 }}
|