Skip to content

Commit

Permalink
Add default github pages config plus crate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-h-chamberlain committed Nov 24, 2023
1 parent 041cf47 commit a65380a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,23 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v3
with:
generator_config_file: ./_site/_config.yml

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site

- uses: rust3ds/test-runner/setup@v1
with:
toolchain: nightly

- name: Build workspace docs
run: cargo 3ds --verbose doc --verbose --no-deps --workspace
env:
# TODO: might want a custom index page ?
# https://doc.rust-lang.org/rustdoc/unstable-features.html#--index-page-provide-a-top-level-landing-page-for-docs
RUSTDOCFLAGS: "--enable-index-page"

# https://github.com/actions/upload-pages-artifact#file-permissions
- name: Fix file permissions
Expand All @@ -32,10 +39,13 @@ jobs:
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload generated docs
- name: Copy generated docs to _site
# Note: this won't include proc-macro crate, but macros are re-exported
# by the crate docs so there will still be some documentation.
run: cp -R ./target/armv6k-nintendo-3ds/doc ./_site/crates

- name: Upload docs
uses: actions/upload-pages-artifact@v2
with:
path: ./target/armv6k-nintendo-3ds/doc

deploy:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

⚠️ WIP ⚠️

Bindings and safe wrapper to the [citro3d](https://github.com/devkitPro/citro3d)
Rust bindings and safe wrapper to the [citro3d](https://github.com/devkitPro/citro3d)
library, to write homebrew graphical programs for the Nintendo 3DS.

## Crates
Expand Down
1 change: 1 addition & 0 deletions _site/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-midnight

0 comments on commit a65380a

Please sign in to comment.