-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (35 loc) · 1.15 KB
/
deploy_branch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy PFE-Lab Branch
on:
# Run this workflow on creation (or sync to source branch) of a new pull request
pull_request:
jobs:
build:
name: Build branch
uses: zooniverse/ci-cd/.github/workflows/npm_build.yaml@main
with:
commit_id: ${{ github.sha }}
node_version: 'lts/hydrogen'
output: 'dist'
script: '_build-staging'
deploy:
name: Deploy branch
uses: zooniverse/ci-cd/.github/workflows/deploy_static.yaml@main
needs: build
with:
source: 'dist'
target: 'preview.zooniverse.org/pfe-lab/pr-${{ github.event.number }}'
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 / build
status: ${{ needs.deploy.result }}
title: 'PFE-Lab Branch pr-${{ github.event.number }} deploy complete'
title_link: 'https://pr-${{ github.event.number }}.lab-preview.zooniverse.org'
secrets:
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}