Skip to content

Commit

Permalink
Generate the sitemap in CI (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
itowlson authored Sep 21, 2023
1 parent 118a5d5 commit 4cb2f29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 97 deletions.
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 @@ -47,13 +47,3 @@ Don't forget to remove the changes in `book.toml` before you commit!
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.

0 comments on commit 4cb2f29

Please sign in to comment.