Merge pull request #106 from idmc-labs/fix/content-type-mapping #434
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- release | |
jobs: | |
lint_test: | |
name: π΄ Lint + Test π΄ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '17.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --prefer-offline | |
- name: π€ Run Lint π§ͺ | |
run: yarn lint | |
# - name: π€ Run Test π§ͺ | |
# run: yarn test | |
run_build: | |
name: π΄ Build π΄ | |
needs: lint_test | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '17.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --prefer-offline | |
- name: π€ Run Build π§ͺ (PREVIEW -> Helix-STAGING) | |
uses: ./.github/actions/run_build | |
with: | |
REACT_APP_ENVIRONMENT: preview | |
BUILD_OUTPUT_DIR: build-preview-helix-staging/ | |
UPLOAD_ARTIFACT_NAME: helix-staging-preview-idmc-website-components | |
REACT_APP_DATA_RELEASE: PRE_RELEASE | |
# Overwrite | |
REACT_APP_HELIX_GRAPHQL_ENDPOINT: https://helix-tools-api-staging.idmcdb.org/graphql | |
REACT_APP_HELIX_REST_ENDPOINT: https://helix-tools-api-staging.idmcdb.org/external-api/ | |
- name: π€ Run Build π§ͺ (PREVIEW -> Helix-PROD) | |
uses: ./.github/actions/run_build | |
with: | |
REACT_APP_ENVIRONMENT: preview | |
BUILD_OUTPUT_DIR: build-preview/ | |
UPLOAD_ARTIFACT_NAME: preview-idmc-website-components | |
REACT_APP_DATA_RELEASE: PRE_RELEASE | |
- name: π€ Run Build π§ͺ (RELEASE/PROD) | |
uses: ./.github/actions/run_build | |
with: | |
REACT_APP_ENVIRONMENT: release | |
BUILD_OUTPUT_DIR: build-release/ | |
UPLOAD_ARTIFACT_NAME: release-idmc-website-components | |
REACT_APP_DATA_RELEASE: RELEASE | |
helix_staging_preview_deploy: | |
name: PREVIEW / HELIX-STAGING | |
needs: run_build | |
uses: ./.github/workflows/aws_deploy.yml | |
secrets: inherit | |
with: | |
GH_ENVIRONMENT_NAME: preview | |
GH_ENVIRONMENT_URL: https://preview-website-components.idmcdb.org | |
ARTIFACT_NAME: helix-staging-preview-idmc-website-components | |
preview_deploy: | |
name: PREVIEW | |
needs: helix_staging_preview_deploy | |
uses: ./.github/workflows/aws_deploy.yml | |
secrets: inherit | |
with: | |
GH_ENVIRONMENT_NAME: preview | |
GH_ENVIRONMENT_URL: https://preview-website-components.idmcdb.org | |
ARTIFACT_NAME: preview-idmc-website-components | |
release_deploy: | |
name: RELEASE | |
needs: helix_staging_preview_deploy | |
uses: ./.github/workflows/aws_deploy.yml | |
secrets: inherit | |
with: | |
GH_ENVIRONMENT_NAME: release | |
GH_ENVIRONMENT_URL: https://release-website-components.idmcdb.org | |
ARTIFACT_NAME: release-idmc-website-components |