Skip to content

Commit

Permalink
Create deploy-documentation.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-ABsid authored Jan 29, 2024
1 parent 37a5680 commit a8a4193
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy-documentation.yml
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 }}

0 comments on commit a8a4193

Please sign in to comment.