Skip to content

Commit cbb8ca4

Browse files
committed
Add vercel deploy github action
1 parent 7ab8a46 commit cbb8ca4

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

actions/publish-vercel/action.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'Vercel Publisher'
2+
description: 'Builds and publishes documentation to vercel'
3+
4+
branding:
5+
icon: 'filter'
6+
color: 'red'
7+
8+
inputs:
9+
VERCEL_TOKEN:
10+
description: 'TOKEN to deploy to vercel'
11+
required: false
12+
VERCEL_ORG_ID:
13+
description: 'The vercel organization id '
14+
required: false
15+
VERCEL_PROJECT_ID:
16+
description: 'The vercel project id'
17+
required: false
18+
19+
runs:
20+
using: "composite"
21+
steps:
22+
- name: Build documentation
23+
uses: elastic/docs-builder@main
24+
25+
- name: "Create temp vercel.json file"
26+
shell: bash
27+
run: |
28+
cat <<EOF > vercel.json
29+
{
30+
"version": 2,
31+
"public": false,
32+
"github": {
33+
"enabled": false
34+
},
35+
"builds": [
36+
{ "src": ".artifacts/docs/html", "use": "@vercel/static" }
37+
]
38+
}
39+
EOF
40+
41+
- uses: amondnet/[email protected] #deploy
42+
with:
43+
vercel-token: ${{ inputs.VERCEL_TOKEN }} # Required
44+
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
45+
#vercel-args: '--prod' #Optional
46+
vercel-org-id: ${{ inputs.VERCEL_ORG_ID}} #Required
47+
vercel-project-id: ${{ inputs.VERCEL_PROJECT_ID}} #Required
48+
working-directory: ./
49+
50+

0 commit comments

Comments
 (0)