« get me outta code hell

build-canonical-preview.yml « workflows « .github - hsmusic-data - Data files for https://hsmusic.wiki - track, album, artist & flash info, etc
summary refs log tree commit diff
path: root/.github/workflows/build-canonical-preview.yml
blob: cda60c00e50062184c914e01401ab90e87aceff6 (plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build Canonical Preview

on:
  push:
    branches: [ "preview" ]

  workflow_dispatch: null

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Install ImageMagick
        uses: awalsh128/cache-apt-pkgs-action@latest
        with:
          packages: imagemagick
          version: 1.0

      - name: Setup node environment
        uses: actions/setup-node@v3
        with:
          node-version: lts/Iron
          check-latest: true

      - name: Checkout canonical data repo
        uses: actions/checkout@v4
        with:
          repository: hsmusic/hsmusic-data
          ref: preview
          path: data

      - name: Checkout canonical code repo
        uses: actions/checkout@v4
        with:
          repository: hsmusic/hsmusic-wiki
          ref: preview
          path: code

      - name: Checkout canonical media repo
        uses: actions/checkout@v4
        with:
          repository: hsmusic/hsmusic-media
          ref: preview
          path: media

      - name: Install code repository
        working-directory: ./code
        run: npm ci

      - name: Generate thumbnails
        run: |
          node code/src/upd8.js \
            --show-step-summary \
            --data-path data \
            --media-path media \
            --thumbs-only

      - name: Run data processing-only pass
        run: |
          node code/src/upd8.js \
            --show-step-summary \
            --data-path data \
            --media-path media \
            --no-build

      - name: Perform full-site static build
        run: |
          mkdir out
          node code/src/upd8.js \
            --data-path data \
            --media-path media \
            --static-build \
            --out-path out