1
1
mirror of https://github.com/primer/css.git synced 2024-12-26 15:43:59 +03:00

Merge branch 'main' into btn-active

This commit is contained in:
Jon Rohan 2021-04-06 10:39:58 -07:00 committed by GitHub
commit 6e9a4bb270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 84 additions and 1 deletions

50
.github/workflows/deploy_preview.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Deploy
on:
push:
branches-ignore:
- main
paths:
- 'src/**'
- 'docs/**'
- '.github/workflows/deploy*.yml'
- 'package.json'
jobs:
deploy-preview:
if: ${{ github.repository == 'primer/css' }}
name: Preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment
id: deployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: Preview
- name: Vercel Action
uses: amondnet/vercel-action@v20.0.0
id: vercel-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN_SHARED }}
github-comment: false
vercel-org-id: ${{ secrets.VERCEL_ORG_ID_SHARED }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment_url: ${{ steps.vercel-action.outputs.preview-url }}
state: "success"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@releases/v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: "failure"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

33
.github/workflows/deploy_production.yml vendored Normal file
View File

@ -0,0 +1,33 @@
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@master
# 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.0.0
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 }}

View File

@ -26,6 +26,6 @@
}
],
"github": {
"silent": true
"enabled": false
}
}