mirror of
https://github.com/BreizhHardware/portfolio.git
synced 2026-01-18 16:37:22 +01:00
fix CI deployement status
This commit is contained in:
21
.github/workflows/deploy.yml
vendored
21
.github/workflows/deploy.yml
vendored
@@ -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 }}
|
||||
Reference in New Issue
Block a user