Repository navigation
59 lines (59 loc) · 2.1 KB
/
Copy pathdocs.yml
File metadata and controls
59 lines (59 loc) · 2.1 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
49
50
51
52
53
54
55
56
57
58
59
# The docs site: Flight Manual builds it from docs/ and site.fm, and
# GitHub Pages publishes it, on each push to main.
name: Docs
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
env:
# ztcl 1.0.0-beta.8 has ztcl::markdown, which Flight Manual needs.
ZTCL_VERSION: "1.0.0-beta.8"
ZTCL_SHA256: "09b18d941cb8610edd3cd03081487031b2f3b6a852fde4a76af77749c3bddb63"
FLIGHT_MANUAL_COMMIT: "31d5dd6959ebe8533c5030dd83729de4a42c363b"
jobs:
build:
name: Build the site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- name: Install ztcl
run: |
name="ztcl-${ZTCL_VERSION}-x86_64-linux-musl"
curl -fsSLO "https://github.com/beetlebugorg/ztcl/releases/download/v${ZTCL_VERSION}/$name.tar.gz"
echo "${ZTCL_SHA256} $name.tar.gz" | sha256sum -c -
tar xzf "$name.tar.gz" -C "$RUNNER_TEMP"
echo "$RUNNER_TEMP/$name" >> "$GITHUB_PATH"
- name: Build Flight Manual
run: |
git init -q "$RUNNER_TEMP/fm"
cd "$RUNNER_TEMP/fm"
git fetch -q --depth 1 https://github.com/beetlebugorg/flight-manual "$FLIGHT_MANUAL_COMMIT"
git checkout -q FETCH_HEAD
ztcl build
- name: Make the pictures
run: |
mkdir -p "$RUNNER_TEMP/shots"
ztcl --allow tui,file,channels tools/ux-mock.tcl
TMPDIR="$RUNNER_TEMP/shots" node tools/shots.mjs "$(command -v google-chrome)" "$(command -v ztcl)" docs/images
- name: Build the site
run: '"$RUNNER_TEMP/fm/build/flight-manual" build -strict _site'
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: _site
deploy:
name: Publish the site
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4