Skip to content

Commit 42b499b

Browse files
committed
- switched to macos for documentation building, retaining ubuntu for deployment to GitHub pages
1 parent 6c6034a commit 42b499b

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

.github/workflows/generateDocumentation.yaml

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,52 @@ permissions:
1313

1414
jobs:
1515
generateDocumentation:
16-
environment:
17-
name: github-pages
18-
url: ${{ steps.deployment.outputs.page_url }}
19-
runs-on: ubuntu-latest
16+
runs-on: macos-15
2017
steps:
2118
- name: Checkout
2219
uses: actions/checkout@v4
23-
- name: Install BLAS and PCRE
24-
run: sudo apt-get install -y libopenblas-dev libpcre3-dev
25-
- uses: jiro4989/setup-nim-action@v2
26-
with:
27-
nim-version: '2.0.2'
28-
repo-token: ${{ secrets.GITHUB_TOKEN }}
29-
- run: nimble refresh
30-
- run: nimble install
31-
- run: nimble install [email protected]
32-
- run: nimble install [email protected]
20+
- name: Install Nim with Homebrew
21+
run: brew install nim
22+
- name: Install nimplex and dependencies
23+
run: nimble install
3324
- name: Build documentation
3425
run: |
3526
cd docs
3627
nim c -r -d:ssl -d:changelogType=nim -d:user=amkrajewski -d:repo=nimplex getChangelog
3728
cd ..
38-
sed -i 's/assets/nimplex\/assets/g' docs/docs.nim
39-
sed -i 's/assets/nimplex\/assets/g' nimplex.nim
29+
sed -i '' 's/assets/nimplex\/assets/g' docs/docs.nim
30+
sed -i '' 's/assets/nimplex\/assets/g' nimplex.nim
4031
nim doc --outdir:docs --index:on --git.url:https://github.com/amkrajewski/nimplex --git.commit:main --docInternal --project nimplex.nim
41-
sed -i '26i<img src="../nimplex/assets/logo.png" alt="Logo" style="width:200px;height:170px;margin:20px 0px 20px 20px;"/>' docs/nimplex.html
42-
sed -i '12d' docs/nimplex.html
43-
sed -i '12d' docs/nimplex.html
44-
sed -i '12i<link rel="icon" href="favicon.ico" type="image/x-icon"><link rel="shortcut icon" href="favicon.ico" type="image/x-icon">' docs/nimplex.html
32+
sed -i '' '26i\
33+
<img src="../nimplex/assets/logo.png" alt="Logo" style="width:200px;height:170px;margin:20px 0px 20px 20px;"/>' docs/nimplex.html
34+
sed -i '' '12d' docs/nimplex.html
35+
sed -i '' '12d' docs/nimplex.html
36+
sed -i '' '12i\
37+
<link rel="icon" href="favicon.ico" type="image/x-icon"><link rel="shortcut icon" href="favicon.ico" type="image/x-icon">' docs/nimplex.html
4538
cp docs/nimplex.html docs/index.html
4639
- name: Copy assets to docs
4740
run: cp -r assets docs/assets
41+
- name: Upload artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: documentation
45+
path: docs/
46+
47+
deploy:
48+
needs: generateDocumentation
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Download artifact
55+
uses: actions/download-artifact@v4
56+
with:
57+
name: documentation
58+
path: docs/
4859
- name: Setup Pages
4960
uses: actions/configure-pages@v4
50-
- name: Upload artifact
61+
- name: Upload pages artifact
5162
uses: actions/upload-pages-artifact@v3
5263
with:
5364
path: 'docs'

0 commit comments

Comments
 (0)