-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.42 KB
/
ci.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
name: Deploy blog to Cloudflare Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
actions-timeline:
needs: [publish]
runs-on: ubuntu-latest
permissions:
actions: read
steps:
- uses: Kesin11/actions-timeline@v2
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: ~/.cache/deno
key: deno-${{ github.job }}-${{ hashFiles('deno.lock') }}
restore-keys: |
deno-${{ github.job }}-
- uses: actions/cache@v3
with:
path: _cache
key: lumecache-${{ github.job }}-${{ hashFiles('deno.lock') }}
restore-keys: |
lumecache-${{ github.job }}-
- uses: denoland/setup-deno@v1
- name: Generate raw YAML for build
run: deno task sync
- name: Build blog
run: deno task build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PAGES_PROJECT_NAME }}
directory: _site
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
wranglerVersion: '3'