From 72f0b99bc3edfb645f645b381c69e4981a024f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= Date: Sun, 25 Aug 2024 17:11:16 +0200 Subject: [PATCH] Update deployement status --- .github/workflows/deploy.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b6157f3..c60b903 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,6 +26,15 @@ jobs: npm ci npm run build + - name: Create GitHub deployment + id: create_deployment + uses: octokit/request-action@v2.x + with: + route: POST /repos/${{ github.repository }}/deployments + ref: ${{ github.sha }} + environment: production + required_contexts: [] + - name: Copy build directory to server uses: Dylan700/sftp-upload-action@v1.2.3 with: @@ -35,4 +44,16 @@ jobs: port: ${{ secrets.SERVER_PORT }} uploads: | ./dist => /webroot/ - delete: true \ No newline at end of file + delete: true + + - name: Update GitHub deployment status + if: success() + uses: octokit/request-action@v2.x + with: + route: POST /repos/${{ github.repository }}/deployments/${{ steps.create_deployment.outputs.data.id }}/statuses + state: success + environment: production + environment_url: https://mrqt.fr + log_url: https://mrqt.fr + description: Deployment succeeded + auto_inactive: true \ No newline at end of file