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:
commit
6e9a4bb270
50
.github/workflows/deploy_preview.yml
vendored
Normal file
50
.github/workflows/deploy_preview.yml
vendored
Normal 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
33
.github/workflows/deploy_production.yml
vendored
Normal 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 }}
|
@ -26,6 +26,6 @@
|
||||
}
|
||||
],
|
||||
"github": {
|
||||
"silent": true
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user