-
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.09 KB
/
web-deploy.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
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy web to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build Cache
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/web/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Build
env:
NEXT_TELEMETRY_DISABLED: 1
run: cd web && yarn install && yarn build
- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: invenhost-web
directory: web/out
gitHubToken: ${{ secrets.GITHUB_TOKEN }}