Skip to content

Deploy_To_Azure_Blobs_Dev #1052

Deploy_To_Azure_Blobs_Dev

Deploy_To_Azure_Blobs_Dev #1052

Workflow file for this run

name: Deploy_To_Azure_Blobs_Dev
on:
push:
paths-ignore: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- "**/README.md" # don't run on README.md file updates anywhere in repo
- "**/dependabot.yml"
branches:
- develop
schedule:
- cron: "27 04 * * *" # 0424am daily
env:
STORAGE_ACCOUNT_NAME: savalidatorwebvuedev # storage account name
STORAGE_ACCOUNT_KEY: ${{ secrets.DEV_STORAGE_KEY }} # storage account key
jobs:
should_run:
uses: IATI/.github/.github/workflows/should_run.yaml@main
deploy:
needs: should_run
if: ${{ needs.should_run.outputs.should_run == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Install dependencies
run: |
npm install
- name: Copy dev environment variables to production file
run: |
rm ./envs/.env.production
cp ./envs/.env.development ./envs/.env.production
- name: Run build
run: |
npm run build:production
- name: Upload to blob storage
uses: azure/CLI@v2
with:
azcliversion: 2.34.0
inlineScript: |
az storage blob upload-batch \
--overwrite true \
--account-name ${{ env.STORAGE_ACCOUNT_NAME }} \
--account-key ${{ env.STORAGE_ACCOUNT_KEY }} \
-d '$web' \
-s dist/
integration-test:
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cypress CI Run
uses: cypress-io/github-action@v6
with:
wait-on: "https://dev-validator.iatistandard.org"
config-file: cypress.config.dev.js
# Mark status checks success/fail on dependabot commits for scheduled deploys
status_check_success:
needs: [deploy, integration-test]
if: success() && github.event_name == 'schedule'
uses: IATI/.github/.github/workflows/status_check_success.yaml@main
status_check_failure:
needs: [deploy, integration-test]
if: failure() && github.event_name == 'schedule'
uses: IATI/.github/.github/workflows/status_check_failure.yaml@main