-
Notifications
You must be signed in to change notification settings - Fork 20
62 lines (54 loc) · 1.65 KB
/
enterprise-app.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
name: enterprise-app
on:
workflow_dispatch:
push:
paths:
- apps/enterprise/**
- apps/shared/**
- .github/workflows/enterprise-app.yml
pull_request:
branches:
- main
- develop
paths:
- apps/enterprise/**
- apps/shared/**
- .github/workflows/enterprise-app.yml
env:
REACT_APP_SENTRY_KEY: "https://0bb9b523ea9c4d36b42af5d11f52dade@o4505212736372736.ingest.sentry.io/4505228892241920"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get yarn cache dir
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Cache yarn
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
working-directory: ./apps/enterprise
- name: Build source code.
run: yarn run build
working-directory: ./apps/enterprise
- name: Publish to Cloudflare Pages
if: github.event_name == 'push'
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: 620ff29bbd515d2848f5306578bd1d1d
projectName: enterprise-protocol-app
directory: apps/enterprise/build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}