Skip to content

Commit a85b8c9

Browse files
committed
fix: add deploy triggers
1 parent 0d81779 commit a85b8c9

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ on:
66
repository_dispatch:
77
types: [production-deployment]
88

9+
# Allows to run the workflow manually from the Actions tab
10+
workflow_dispatch:
11+
inputs:
12+
tag:
13+
description: Tag or branch to deploy
14+
required: false
15+
default: main
16+
type: string
17+
918
# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
1019
jobs:
1120
deploy-app-to-prod:
@@ -16,7 +25,7 @@ jobs:
1625
- name: Checkout code
1726
uses: actions/checkout@v4
1827
with:
19-
ref: ${{ github.event.client_payload.tag }}
28+
ref: ${{ github.event.client_payload.tag || inputs.tag }}
2029

2130
- name: Yarn install and Cache dependencies
2231
uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1
@@ -28,7 +37,7 @@ jobs:
2837
VITE_GRAASP_APP_KEY: ${{ secrets.APP_KEY }}
2938
VITE_SENTRY_ENV: production
3039
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
31-
VITE_VERSION: ${{ github.event.client_payload.tag }}
40+
VITE_VERSION: ${{ github.event.client_payload.tag || inputs.tag }}
3241
run: yarn build
3342
shell: bash
3443

.github/workflows/deploy-stage.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ on:
66
repository_dispatch:
77
types: [staging-deployment]
88

9+
# Allows to run the workflow manually from the Actions tab
10+
workflow_dispatch:
11+
inputs:
12+
tag:
13+
description: Tag or branch to deploy
14+
required: false
15+
default: main
16+
type: string
17+
918
# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
1019
jobs:
1120
deploy-app-to-staging:
@@ -16,7 +25,7 @@ jobs:
1625
- name: Checkout code
1726
uses: actions/checkout@v4
1827
with:
19-
ref: ${{ github.event.client_payload.tag }}
28+
ref: ${{ github.event.client_payload.tag || inputs.tag }}
2029

2130
- name: Yarn install and Cache dependencies
2231
uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1
@@ -28,7 +37,7 @@ jobs:
2837
VITE_GRAASP_APP_KEY: ${{ secrets.APP_KEY }}
2938
VITE_SENTRY_ENV: staging
3039
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
31-
VITE_VERSION: ${{ github.event.client_payload.tag }}
40+
VITE_VERSION: ${{ github.event.client_payload.tag || inputs.tag }}
3241
run: yarn build
3342
shell: bash
3443

0 commit comments

Comments
 (0)