Skip to content

Commit

Permalink
Tentative de correction du workflow de déploiement
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrelemee committed Dec 19, 2024
1 parent 48853f8 commit da44138
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ on:
types:
- completed
branches:
- prod
- develop

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
deploy:
runs-on: ubuntu-24.04
Expand All @@ -21,12 +17,12 @@ jobs:
# Fetch all history
fetch-depth: 0
- name: Install clever tools
run: npm install -g clever-tools
run: |
npm install -g clever-tools
- name: Deploy to dev application
run: clever deploy --app $CC_APP_DEV_ID
if: ${{ (github.head_ref || github.ref_name) == 'develop' }}

- name: Deploy to prod application
run: clever deploy --app $CC_APP_PROD_ID
if: ${{ (github.head_ref || github.ref_name) == 'prod' }}
if: github.event.workflow_run.head_branch == 'prod'
24 changes: 24 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy

on:
workflow_run:
workflows: [ "Test" ]
types:
- completed
branches:
- prod

jobs:
deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
# Fetch all history
fetch-depth: 0
- name: Install clever tools
run: |
npm install -g clever-tools
- name: Deploy to prod application
run: clever deploy --app $CC_APP_PROD_ID

0 comments on commit da44138

Please sign in to comment.