Skip to content

Commit fea431c

Browse files
svchbLasNikas
authored andcommitted
Test docs on win (trixi-framework#664)
* Test docs on win * Fix error on windows * Format * Update Documenter.yml * Update Documenter.yml
1 parent 679d297 commit fea431c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/Documenter.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ concurrency:
2525
jobs:
2626
build-docs:
2727
name: Build and Deploy Documentation
28-
runs-on: ubuntu-latest
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
matrix:
31+
os: [ubuntu-latest, windows-latest]
2932
steps:
3033
- name: Check out project
3134
uses: actions/checkout@v4
@@ -40,7 +43,11 @@ jobs:
4043
- name: Install dependencies
4144
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
4245
- name: Build and deploy
46+
if: matrix.os == 'ubuntu-latest'
4347
env:
4448
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4549
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
4650
run: julia --project=docs --color=yes docs/make.jl
51+
- name: Just Build
52+
if: matrix.os != 'ubuntu-latest'
53+
run: julia --project=docs --color=yes docs/make.jl

docs/make.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ function copy_file(filename, replaces...;
1919
content = read(source_path, String)
2020
content = replace(content, replaces...)
2121

22+
# Use `replace` to make sure the path uses forward slashes for URLs
23+
filename_url = replace(filename, "\\" => "/")
24+
2225
header = """
2326
```@meta
24-
EditURL = "https://github.com/trixi-framework/TrixiParticles.jl/blob/main/$filename"
27+
EditURL = "https://github.com/trixi-framework/TrixiParticles.jl/blob/main/$filename_url"
2528
```
2629
"""
2730
content = header * content

0 commit comments

Comments
 (0)