-
Notifications
You must be signed in to change notification settings - Fork 3.8k
47 lines (39 loc) · 1018 Bytes
/
deploy-1000h.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
43
44
45
46
name: Deploy 1000h website
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "1000-hours/**"
pull_request:
branches:
- main
paths:
- "1000-hours/**"
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
# checkout the code
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Setup node env
uses: actions/setup-node@master
with:
node-version: "20"
- name: Install dependencies
run: yarn install
- name: Build
run: yarn docs:build
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy .vitepress/dist --project-name=1000-hours-prod
workingDirectory: "1000-hours"