|
10 | 10 | workflow_dispatch: |
11 | 11 |
|
12 | 12 | jobs: |
| 13 | + docs: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v6 |
| 17 | + |
| 18 | + - name: Install Pandoc |
| 19 | + run: sudo apt-get update && sudo apt-get install -y pandoc |
| 20 | + |
| 21 | + - name: Create Header |
| 22 | + run: | |
| 23 | + curl -L https://raw.githubusercontent.com/sindresorhus/github-markdown-css/main/github-markdown.css -o github.css |
| 24 | + echo '<style>' > header.html |
| 25 | + cat github.css >> header.html |
| 26 | + # Force the styles onto the body tag directly |
| 27 | + echo 'body { box-sizing: border-box; min-width: 300px; max-width: 980px; margin: 0 auto; padding: 45px; }' >> header.html |
| 28 | + echo '@media (max-width: 767px) { body { padding: 15px; } }' >> header.html |
| 29 | + echo '</style>' >> header.html |
| 30 | + echo '<article class="markdown-body">' > before.html |
| 31 | + echo '</article>' > after.html |
| 32 | +
|
| 33 | + pandoc README.md \ |
| 34 | + -f gfm \ |
| 35 | + -t html \ |
| 36 | + --embed-resources \ |
| 37 | + --standalone \ |
| 38 | + --include-in-header=header.html \ |
| 39 | + --include-before-body=before.html \ |
| 40 | + --include-after-body=after.html \ |
| 41 | + --metadata title="README" \ |
| 42 | + -o README.html |
| 43 | +
|
| 44 | + - name: Upload Documentation Artifact |
| 45 | + uses: actions/upload-artifact@v7 |
| 46 | + with: |
| 47 | + name: documentation |
| 48 | + path: README.html |
| 49 | + |
13 | 50 | build-linux-macos: |
14 | 51 | runs-on: ${{ matrix.os }} |
15 | 52 | strategy: |
@@ -112,7 +149,7 @@ jobs: |
112 | 149 |
|
113 | 150 | release: |
114 | 151 | runs-on: ubuntu-latest |
115 | | - needs: [build-linux-macos, build-windows] |
| 152 | + needs: [docs, build-linux-macos, build-windows] |
116 | 153 |
|
117 | 154 | steps: |
118 | 155 | - uses: actions/checkout@v6 |
@@ -146,6 +183,9 @@ jobs: |
146 | 183 | do |
147 | 184 | tar xvf $t |
148 | 185 | done |
| 186 | + cp ./build/documentation/README.html openSAM-pkg/ |
| 187 | + cp ./build/documentation/README.html openSAM-pkg/openSAM/ |
| 188 | + cp ./build/documentation/README.html openSAM-pkg/openSAM_Library/ |
149 | 189 | bash ./sync_xp11_pkg.sh |
150 | 190 |
|
151 | 191 | - name: Prepare Skunkcrafts Updater |
|
0 commit comments