forked from CeleritasCelery/rune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I tried different things and ended up choosing netlify. Netlify has a very powerful build system and it's running on Ubuntu, but it did not allow for apt-get installs. Since we need pango and gdk to run `cargo doc` on the crate, moved to Github actions. As part of the same PR, I fixed all the warnings on cargo doc, making sure that the documentation is correctly published. The trick to deploy cargo doc is to deploy `target/doc` and then pair that with a redirect of the main page (configured rune-rs.netlify.app on my own account) to `/rune` which (as the main crate) has the info about the subcrates as well. Closes CeleritasCelery#48
- Loading branch information
Showing
9 changed files
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: build and deploy to netlify | ||
on: | ||
push: | ||
branches: [master] | ||
jobs: | ||
publish-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Install the required system libraries | ||
run: sudo apt-get -y install libpango1.0-dev libgtk-3-dev | ||
# run docs generation on nightly rather than stable. This enables features like | ||
# https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an | ||
# API be documented as only available in some specific platforms. | ||
- name: Install nightly | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: cargo doc | ||
run: cargo +nightly doc --no-deps --all-features --workspace | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
- name: Deploy to Netlify | ||
uses: nwtgck/actions-netlify@v2.0 | ||
with: | ||
publish-dir: "./target/doc" | ||
production-branch: master | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: "Deploy from GitHub Actions" | ||
enable-pull-request-comment: false | ||
enable-commit-comment: true | ||
overwrites-pull-request-comment: true | ||
netlify-config-path: "./netlify.toml" | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
timeout-minutes: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[[redirects]] | ||
from = "/" | ||
to = "/rune" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0450b79
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://rune-rs.netlify.app as production
🚀 Deployed on https://657dd7ac4f9e7f531efa86af--rune-rs.netlify.app