Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): sitemap generation #229

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ jobs:
fi

- name: Generate sitemap
shell: bash
run: |
cd ${{ env.ARTIFACT_PATH }}
python3 ../scripts/generate_sitemap.py --domain "component-model.bytecodealliance.org" --higher-priority "design" --output-path book/sitemap.xml
cd ..
python3 ../../../scripts/generate_sitemap.py --domain "component-model.bytecodealliance.org" --higher-priority "design" --output-path sitemap.xml
cd ../../../

- name: Setup Pages
id: pages
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def parse_summary():
"""Parse URLs from the SUMMARY.md file."""
with open("src/SUMMARY.md", "r") as file:
with open("../../src/SUMMARY.md", "r") as file:
for line in file:
if "](" in line:
url = line.split("](")[1].split(")")[0]
Expand Down