-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (61 loc) · 2.15 KB
/
master.yaml
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
name: Master
on:
push:
branches:
- 'master'
- 'main'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Init
uses: ./.github/actions/init
- name: Build
run: npm run build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
- name: Deploy image
uses: valitydev/action-deploy-docker@v2
with:
registry-username: ${{ github.actor }}
registry-access-token: ${{ secrets.GITHUB_TOKEN }}
- name: set config
run: |
printf "$APP_ENV_FILE" > dist/v1/appConfig.json
shell: bash
env:
APP_ENV_FILE: ${{secrets.APP_CONFIG_CF}}
- name: Publish to CF Pages
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'payform'
directory: 'dist'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
- name: set v2 config
run: |
printf "$APP_2_ENV_FILE" > dist/v1/appConfig.json
shell: bash
env:
APP_2_ENV_FILE: ${{secrets.APP_2_CONFIG_CF}}
- name: Publish 2 to CF Pages
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'payform-2'
directory: 'dist'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main