-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 1.97 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
53
54
55
56
57
58
name: Deploy blog to Cloudflare Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
actions-timeline:
timeout-minutes: 11
needs: [publish]
runs-on: ubuntu-latest
permissions:
actions: read
steps:
- uses: Kesin11/actions-timeline@da70beff098ff89b15d279e8bf2f60519a8dadd7 # v2.2.0
publish:
timeout-minutes: 17
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Set timezone to JST
# lume の `log.date | date('DATETIME', 'ja')` が動くにはタイムゾーンを日本に変更する必要がある
run: |
sudo timedatectl set-timezone Asia/Tokyo
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: ~/.cache/deno
key: deno-${{ github.job }}-${{ hashFiles('deno.lock') }}
restore-keys: |
deno-${{ github.job }}-
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: _cache
key: lumecache-${{ github.job }}-${{ hashFiles('deno.lock') }}
restore-keys: |
lumecache-${{ github.job }}-
- uses: denoland/setup-deno@ba9dcf3bc3696623d1add6a2f5181ee1b5143de5 # v1.3.0
- 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@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1.5.0
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'