Repository navigation
45 lines (40 loc) · 1.42 KB
/
Copy pathdocs.yml
File metadata and controls
45 lines (40 loc) · 1.42 KB
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
name: Docs
# The website deploys on every push to main, since its numbers and pages come from across the repository. Branches and
# pull requests build nothing here.
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
env:
# CI makes no commits. Without the hook dispatcher, the packages' `vp config`
# prepare scripts don't race each other for .git/config during install.
VP_GIT_HOOKS: "0"
# A deploy finishes before the next one starts, so main's latest push always wins.
concurrency:
group: docs-deploy
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
environment:
name: docs
url: https://tiny.onmax.me
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: corepack enable
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .node-version
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm docs:generate
# The Worker's config comes from docs/nuxt.config.ts, which the build writes out with the Worker.
- run: pnpm exec wrangler deploy --config docs/dist/server/wrangler.json
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}