~kris/9p

krisyotam.net

ref: 8bfa4b74cf61e74b5d7c8df7d0b0bceefe2569fe krisyotam.net/.build.yml -rw-r--r-- 1.0 KiB
8bfa4b74 — Kris Yotam ci: declare SourceHut source for push builds a month ago
                                                                                
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
image: ubuntu/lts
secrets:
  - 661293bf-f6d3-4ee1-8e74-34ea2fb70598
environment:
  VERCEL_ORG_ID: team_OoMniSEFMV1Arj9XJTTyujIC
  VERCEL_PROJECT_ID: prj_Xj05rp3qZR6CY9iOHtDkuYXQfx3A
sources:
  - https://git.sr.ht/~krisyotam/krisyotam.net
submitter:
  git.sr.ht:
    enabled: true
    allow-refs:
      - refs/heads/main
tasks:
  - clone: |
      if [ ! -d krisyotam.net/.git ]; then
        git clone --no-recurse-submodules \
          https://git.sr.ht/~krisyotam/krisyotam.net
      fi
  - setup: |
      sudo apt-get update
      sudo apt-get install -y 9base python3
      curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
      sudo apt-get install -y nodejs
      sudo npm install -g vercel@latest
  - build: |
      cd krisyotam.net
      python3 scripts/build_static.py . dist
  - deploy: |
      cd krisyotam.net
      set +x
      source ~/.config/vercel/auth.env
      vercel deploy dist \
        --prod \
        --yes \
        --token="$VERCEL_TOKEN" \
        --meta source=sourcehut \
        --meta commit="$(git rev-parse HEAD)"