Add deployment
All checks were successful
Production deployment / Production-Deployment (push) Successful in 47s
All checks were successful
Production deployment / Production-Deployment (push) Successful in 47s
This commit is contained in:
54
.gitea/workflows/deployment.yaml
Normal file
54
.gitea/workflows/deployment.yaml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
name: Production deployment
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Production-Deployment:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: master
|
||||||
|
|
||||||
|
- name: Install node version 20.11.x
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 20.11.x
|
||||||
|
|
||||||
|
- name: Install dependencies and build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Invoke deployment hook
|
||||||
|
uses: distributhor/workflow-webhook@v3
|
||||||
|
if: ${{ success() }}
|
||||||
|
with:
|
||||||
|
webhook_url: ${{ vars.WEBHOOK_URL }}
|
||||||
|
|
||||||
|
- name: Deployment Success
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
severity: info
|
||||||
|
details: Production deployment succeeded!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
|
- name: Deployment Failure
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
severity: error
|
||||||
|
details: Production deployment failed!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
|
- name: Deployment Cancelled
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: cancelled()
|
||||||
|
with:
|
||||||
|
severity: warn
|
||||||
|
details: Production deployment cancelled!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
Reference in New Issue
Block a user