Skip to content

Commit

Permalink
Add vercel deploy github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Dec 10, 2024
1 parent 7ab8a46 commit cbb8ca4
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions actions/publish-vercel/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'Vercel Publisher'
description: 'Builds and publishes documentation to vercel'

branding:
icon: 'filter'
color: 'red'

inputs:
VERCEL_TOKEN:
description: 'TOKEN to deploy to vercel'
required: false
VERCEL_ORG_ID:
description: 'The vercel organization id '
required: false
VERCEL_PROJECT_ID:
description: 'The vercel project id'
required: false

runs:
using: "composite"
steps:
- name: Build documentation
uses: elastic/docs-builder@main

- name: "Create temp vercel.json file"
shell: bash
run: |
cat <<EOF > vercel.json
{
"version": 2,
"public": false,
"github": {
"enabled": false
},
"builds": [
{ "src": ".artifacts/docs/html", "use": "@vercel/static" }
]
}
EOF
- uses: amondnet/[email protected] #deploy
with:
vercel-token: ${{ inputs.VERCEL_TOKEN }} # Required
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
#vercel-args: '--prod' #Optional
vercel-org-id: ${{ inputs.VERCEL_ORG_ID}} #Required
vercel-project-id: ${{ inputs.VERCEL_PROJECT_ID}} #Required
working-directory: ./


0 comments on commit cbb8ca4

Please sign in to comment.