fix CI deployement status

This commit is contained in:
2024-08-25 17:14:39 +02:00
parent cea775798d
commit a9d5039662

View File

@@ -9,6 +9,7 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
@@ -26,15 +27,6 @@ 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:
@@ -44,13 +36,4 @@ jobs:
port: ${{ secrets.SERVER_PORT }}
uploads: |
./dist => /webroot/
delete: true
- name: Mark deployment as successful
if: success()
uses: octokit/request-action@v2.x
with:
route: POST /repos/${{ github.repository }}/deployments/${{ steps.create_deployment.outputs.deployment_id }}/statuses
state: success
environment: production
log_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
delete: truetions/runs/${{ github.run_id }}