mirror of
https://github.com/BreizhHardware/portfolio.git
synced 2026-03-18 21:40:29 +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:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment: production
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -26,15 +27,6 @@ jobs:
|
|||||||
npm ci
|
npm ci
|
||||||
npm run build
|
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
|
- name: Copy build directory to server
|
||||||
uses: Dylan700/sftp-upload-action@v1.2.3
|
uses: Dylan700/sftp-upload-action@v1.2.3
|
||||||
with:
|
with:
|
||||||
@@ -44,13 +36,4 @@ jobs:
|
|||||||
port: ${{ secrets.SERVER_PORT }}
|
port: ${{ secrets.SERVER_PORT }}
|
||||||
uploads: |
|
uploads: |
|
||||||
./dist => /webroot/
|
./dist => /webroot/
|
||||||
delete: true
|
delete: truetions/runs/${{ github.run_id }}
|
||||||
|
|
||||||
- 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 }}
|
|
||||||
Reference in New Issue
Block a user