Skip to content

Capture Growth Chart: Build & Deploy #34

Capture Growth Chart: Build & Deploy

Capture Growth Chart: Build & Deploy #34

Workflow file for this run

name: 'Capture Growth Chart: Build & Deploy'
on:
workflow_run:
workflows:
- 'Capture Growth Chart: verify app'
branches: master
types:
- completed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
install:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
deploy:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Build & Deploy
shell: bash
env:
USERNAME: ${{ secrets.DHIS2_PROD_USERNAME }}
PASSWORD: ${{ secrets.DHIS2_PROD_PASSWORD }}
BASE_URL: ${{ secrets.DHIS2_PROD_URL }}
run: yarn deploy:test "$BASE_URL" --username "$USERNAME" --password "$PASSWORD"