File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : publish-to-vercel
2+ on :
3+ workflow_call :
4+ inputs :
5+ is-preview :
6+ description : ' Is this a preview deployment?'
7+ default : true
8+ required : false
9+ type : boolean
10+ env :
11+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
12+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
13+ jobs :
14+ publish :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v3
18+ - uses : actions/setup-node@v3
19+ with :
20+ node-version-file : ' .nvmrc'
21+ cache : ' pnpm'
22+ 23+ - run : pnpm install --frozen-lockfile
24+ - name : Pull Vercel Environment Information
25+ run : vercel pull --yes --environment=${{ inputs.is-preview && 'preview' || 'production'}} --token=${{ secrets.VERCEL_TOKEN }}
26+ - name : Build Project Artifacts
27+ run : vercel build --token=${{ secrets.VERCEL_TOKEN }} ${{ !inputs.is-preview && '--prod'}}
28+ - name : Deploy Project Artifacts to Vercel
29+ run : vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} ${{ !inputs.is-preview && '--prod'}}
Original file line number Diff line number Diff line change 1+ name : issue-publish
2+ on :
3+ issues :
4+ types :
5+ - labeled
6+ jobs :
7+ post_created :
8+ if : |
9+ !github.event.issue.pull_request &&
10+ contains(github.event.issue.labels.*.name, 'status/not-published')
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : ./.github/workflows/deploy-to-vercel.yml
14+ with :
15+ is-preview : true
16+ post_published :
17+ if : |
18+ !github.event.issue.pull_request &&
19+ (
20+ contains(github.event.issue.labels.*.name, 'status/published') ||
21+ contains(github.event.issue.labels.*.name, 'status/archived') ||
22+ contains(github.event.issue.labels.*.name, 'meta/featured')
23+ )
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : ./.github/workflows/deploy-to-vercel.yml
27+ with :
28+ is-preview : false
You can’t perform that action at this time.
0 commit comments