diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 271901d..5de0b43 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: lfs: true - uses: cargo-bins/cargo-binstall@main - name: Install mdBook, mdBook-KaTeX, and mdBook-ToC - run: cargo binstall -y mdbook mdbook-katex mdbook-toc mdbook-sitemap-generator + run: cargo binstall -y mdbook mdbook-katex mdbook-toc - name: Install minify-html run: | curl -LO https://github.com/wilsonzlin/minify-html/releases/download/v0.15.0/minhtml-0.15.0-x86_64-unknown-linux-gnu @@ -24,7 +24,10 @@ jobs: - name: Build run: mdbook build - name: Generate sitemap - run: sh gen_sitemap.sh + uses: cicirello/generate-sitemap@v1 + with: + path-to-root: _site + base-url-path: https://sichanghe.github.io/ - name: Remove dummy CV for search indexing, making clicks fall through to the other repository's pages run: rm _site/curriculum_vitae/index.html - name: Minify HTML and CSS diff --git a/gen_sitemap.sh b/gen_sitemap.sh deleted file mode 100644 index bde2081..0000000 --- a/gen_sitemap.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Patch modified from . -mdbook-sitemap-generator -d sichanghe.github.io \ - | awk '{gsub(/urls>/, "url>"); gsub(/xlmns/, "xmlns"); print}' \ - > _site/sitemap.xml