-
-
Notifications
You must be signed in to change notification settings - Fork 89
42 lines (34 loc) · 950 Bytes
/
publish.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
# https://docs.github.com/actions
name: Publish
on:
push:
schedule:
- cron: '30 15 * * *'
permissions:
deployments: write
jobs:
publish:
name: Cloudflare Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- name: Install NPM packages
run: npm ci
- name: Fetch sponsors
run: npm run fetch-sponsors --if-present
- name: Run build
run: npm run build --if-present
- name: Publish to Cloudflare Pages
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} build