-
Notifications
You must be signed in to change notification settings - Fork 12
64 lines (61 loc) · 2.13 KB
/
cd-workflow.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: PagerDuty Live Continuous Deployment Pipeline (Main)
on:
push:
branches:
- main
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
CI: false
REACT_APP_PD_ENV: ${{ secrets.PD_ENV }}
REACT_APP_PD_SUBDOMAIN_ALLOW_LIST: '*'
REACT_APP_PD_OAUTH_CLIENT_ID: ${{ secrets.PD_OAUTH_CLIENT_ID }}
REACT_APP_PD_OAUTH_CLIENT_SECRET: ${{ secrets.PD_OAUTH_CLIENT_SECRET }}
REACT_APP_PD_REQUIRED_ABILITY: ${{ secrets.PD_REQUIRED_ABILITY }}
REACT_APP_DD_APPLICATION_ID: ${{ secrets.DD_APPLICATION_ID }}
REACT_APP_DD_CLIENT_TOKEN: ${{ secrets.DD_CLIENT_TOKEN }}
REACT_APP_DD_SITE: ${{ secrets.DD_SITE }}
REACT_APP_DD_SAMPLE_RATE: ${{ secrets.DD_SAMPLE_RATE }}
REACT_APP_DD_TRACK_INTERACTIONS: ${{ secrets.DD_TRACK_INTERACTIONS }}
REACT_APP_DD_DEFAULT_PRIVACY_LEVEL: ${{ secrets.DD_DEFAULT_PRIVACY_LEVEL }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set-up Node
uses: actions/setup-node@v1
with:
node-version: '16.19.0'
- name: Install Yarn
run: npm install -g yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-modules-
- name: Install project dependencies (via cache)
run: yarn --prefer-offline
- name: Build application bundle
run: yarn build
- name: Deploy
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: build
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
sync-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Merge main -> develop
uses: devmasx/merge-branch@master
with:
type: now
from_branch: main
target_branch: develop
github_token: ${{ secrets.GH_TOKEN }}