From ebfaf42888c449e0f3319afed86202f59f0ab87e Mon Sep 17 00:00:00 2001 From: Hiroshi Nishio Date: Wed, 27 Nov 2024 17:01:06 +0900 Subject: [PATCH] Add a staging github workflow too --- .github/workflows/deploy.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0fb61bf..d848523 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,9 @@ name: Deploy Forge App to Jira on: + pull_request: + branches: + - main push: branches: - main @@ -47,4 +50,15 @@ jobs: # Deploy Forge App # https://developer.atlassian.com/platform/forge/staging-and-production-apps/#deploy-to-a-specific-environment - name: Deploy Forge App - run: forge deploy -e production + run: | + if [ "${{ github.event_name }}" == "push" ]; then + forge deploy -e production + else + forge deploy -e staging + fi + + # Install Forge app dependencies + # https://developer.atlassian.com/platform/forge/cli-reference/install/ + - name: Install Forge dependencies + if: github.event_name == 'pull_request' + run: forge install -e staging -s gitauto.atlassian.net --p Jira --upgrade --confirm-scopes --non-interactive --verbose