-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Workflow to build and deploy site to Vercel using Hugo | ||
|
||
# Name of Workflow | ||
name: deploy-documentation | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the vercel-dev branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "deploy" | ||
deploy: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-20.04 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Start Deployment | ||
uses: bobheadxi/[email protected] | ||
id: deployment | ||
with: | ||
step: start | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
env: Preview | ||
|
||
# Step 1 - Checks-out your repository under $GITHUB_WORKSPACE | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Step 4 - Push our generated site to vercel | ||
- name: Deploy to Vercel | ||
uses: amondnet/vercel-action@v20 | ||
id: vercel-action | ||
with: | ||
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required | ||
#github-token: ${{ secrets.GITHUB_TOKEN }} #Optional | ||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} #Required | ||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} #Required | ||
github-comment: false | ||
#vercel-args: '--prod' #Optional | ||
working-directory: documentation | ||
|
||
- name: Update Deployment Status | ||
uses: bobheadxi/[email protected] | ||
if: always() | ||
with: | ||
step: finish | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
status: ${{ job.status }} | ||
deployment_id: ${{ steps.deployment.outputs.deployment_id }} | ||
env_url: ${{ steps.vercel-action.outputs.preview-url }} |