Upgrade to Node 20 (#722) #211
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: Deploy ALICE Staging | |
on: | |
# Run this workflow on push to master (incl PR merges) | |
push: | |
branches: [ master ] | |
# Allow running this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build_staging: | |
name: Build Staging | |
runs-on: ubuntu-latest | |
env: | |
HEAD_COMMIT: ${{ github.sha }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Node.js build | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/iron' | |
cache: 'yarn' | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
env: | |
REACT_APP_ENV: development | |
- name: Write commit_id.txt | |
run: echo ${HEAD_COMMIT} > ./build/commit_id.txt | |
- name: Save build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: ./build/ | |
deploy: | |
name: Deploy Staging | |
uses: zooniverse/ci-cd/.github/workflows/deploy_static.yaml@main | |
needs: build_staging | |
with: | |
source: 'build' | |
target: 'preview.zooniverse.org/alice' | |
secrets: | |
creds: ${{ secrets.AZURE_STATIC_SITES }} | |
slack_notification: | |
name: Send Slack notification | |
uses: zooniverse/ci-cd/.github/workflows/slack_notification.yaml@main | |
needs: deploy | |
if: always() | |
with: | |
commit_id: ${{ github.sha }} | |
job_name: Build Staging | |
status: ${{ needs.deploy.result }} | |
title: 'ALICE Staging deploy complete' | |
title_link: 'https://preview.zooniverse.org/alice' | |
secrets: | |
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} |