Skip to content

Commit

Permalink
Create deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
migtarx authored Oct 30, 2023
1 parent 2b344bc commit 5fb72a9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy
run-name: Deploy to ${{ inputs.deploy_env }}
on:
workflow_dispatch:
inputs:
git_ref:
default: latest
required: true
description: Deploy version
deploy_env:
type: choice
default: PRODUCTION
description: Deploy enviroment
options:
- PRODUCTION

jobs:
deploy:
name: Deploy To ${{ github.event.inputs.deploy_env }}
runs-on: [self-hosted, linux, x64, "${{ github.event.inputs.deploy_env }}"]
steps:
- name: Deploy
uses: actions/checkout@v3
if: github.event.inputs.git_ref == 'latest'
- name: Rollback
uses: actions/checkout@v3
if: github.event.inputs.git_ref != 'latest'
with:
ref: ${{ github.event.inputs.git_ref }}
- name: Install dependencies
run: npm i
- name: Build hugo
run: hugo

0 comments on commit 5fb72a9

Please sign in to comment.