-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.03 KB
/
deploy.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
name: cloudflare-pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '18' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/[email protected]
- name: Cache node modules
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
- run: yarn install
- run: yarn css
- run: yarn build
- name: Deploy to cloudflare pages
run: |
npm install wrangler -g
wrangler pages deploy public --project-name=pronounce --commit-dirty=true
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}