diff --git a/.gitea/workflows/deployment.yaml b/.gitea/workflows/deployment.yaml new file mode 100644 index 0000000..6d6c310 --- /dev/null +++ b/.gitea/workflows/deployment.yaml @@ -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 }} \ No newline at end of file