-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 947 Bytes
/
frontend.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
name: "frontend"
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- 'frontend/**'
jobs:
frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node@16
uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install --immutable
working-directory: ./frontend
- run: yarn build
working-directory: ./frontend
env:
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
- run: yarn export
working-directory: ./frontend
- name: Update Cloudflare Pages deployment
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: ./frontend/out