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

Generate the sitemap in CI #76

Merged
merged 1 commit into from
Sep 21, 2023
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
8 changes: 8 additions & 0 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,26 @@ jobs:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.21
SITEMAP_GEN_VERSION: 0.2.0
PUBLISH_DOMAIN: component-model.bytecodealliance.org
steps:
- uses: actions/checkout@v3
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --version ${MDBOOK_VERSION} mdbook
cargo install --version ${SITEMAP_GEN_VERSION} mdbook-sitemap-generator
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with mdBook
run: mdbook build component-model
- name: Generate sitemap
run: |
cd component-model
mdbook-sitemap-generator -d ${PUBLISH_DOMAIN} -o book/sitemap.xml
cd ..
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down
10 changes: 0 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,3 @@ mdbook serve --open
You can click the Fork button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called a fork. Make any changes you want in your fork, and when you are ready to submit those changes, go to your fork and create a new pull request to let us know about it.

Everyone is welcome to submit a pull request! Once your pull request is created, we'll try to get to reviewing it or responding to it in at most a few days. As the owner of the pull request, it is your responsibility to modify your pull request to address the feedback that has been provided to you by the reviewer.

### Adding New Pages

If you add a new page to the site, please note that the `sitemap.xml` will need to be updated to include that new page. The sitemap can be updated using the following proceedure:

```bash
cargo install mdbook-sitemap-generator
cd component-docs
mdbook-sitemap-generator -d component-model.bytecodealliance.org -o sitemap.xml
```
87 changes: 0 additions & 87 deletions component-model/src/sitemap.xml

This file was deleted.