-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.48 KB
/
Copy pathwebsite.yml
File metadata and controls
48 lines (44 loc) · 1.48 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
46
47
48
# The website — the landing page at / and the documentation at /docs/, one
# Hugo site (Hextra vendored as a git submodule) — built with the same pinned
# Hugo version a developer runs locally, after the viz bundle it embeds at
# /city/ (so it needs pnpm, and a change to packages/viz is a change to the
# site). Independent of ci.yml: it runs only when the site's inputs change,
# and ci.yml ignores website/, so a docs-only commit builds the site and
# nothing else.
name: website
on:
push:
branches: [main]
paths: ["website/**", "packages/viz/**", ".github/workflows/website.yml"]
pull_request:
paths: ["website/**", "packages/viz/**", ".github/workflows/website.yml"]
permissions:
contents: read
jobs:
website:
name: website (hugo)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.165.0"
extended: true
- uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
# builds the viz bundle into static/city/ (the live city at /city/), then hugo
- run: pnpm --filter @codegraph/website build
- uses: actions/upload-artifact@v4
with:
name: website
path: website/public
retention-days: 7