|
|
@ -1,4 +1,4 @@ |
|
|
|
name: docs |
|
|
|
name: GitHub Pages |
|
|
|
|
|
|
|
|
|
|
|
on: |
|
|
|
on: |
|
|
|
push: |
|
|
|
push: |
|
|
@ -7,7 +7,7 @@ on: |
|
|
|
workflow_dispatch: |
|
|
|
workflow_dispatch: |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
publish: |
|
|
|
build: |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ubuntu-latest |
|
|
|
container: devkitpro/devkitarm |
|
|
|
container: devkitpro/devkitarm |
|
|
|
steps: |
|
|
|
steps: |
|
|
@ -20,12 +20,36 @@ jobs: |
|
|
|
|
|
|
|
|
|
|
|
- name: Build workspace docs |
|
|
|
- name: Build workspace docs |
|
|
|
run: cargo 3ds --verbose doc --verbose --no-deps --workspace |
|
|
|
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 |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
chmod -c -R +rX "target/armv6k-nintendo-3ds/doc" | while read line; do |
|
|
|
|
|
|
|
echo "::warning title=Invalid file permissions automatically fixed::$line" |
|
|
|
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
- name: Upload generated docs |
|
|
|
- name: Upload generated docs |
|
|
|
uses: actions/upload-pages-artifact@v2 |
|
|
|
uses: actions/upload-pages-artifact@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
path: ./target/armv6k-nintendo-3ds/doc |
|
|
|
path: ./target/armv6k-nintendo-3ds/doc |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy GitHub pages |
|
|
|
deploy: |
|
|
|
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
|
|
needs: build |
|
|
|
|
|
|
|
permissions: |
|
|
|
|
|
|
|
pages: write |
|
|
|
|
|
|
|
id-token: write |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
environment: |
|
|
|
|
|
|
|
name: github-pages |
|
|
|
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
|
|
|
- name: Deploy to GitHub Pages |
|
|
|
|
|
|
|
id: deployment |
|
|
|
uses: actions/deploy-pages@v2 |
|
|
|
uses: actions/deploy-pages@v2 |
|
|
|
|
|
|
|
|
|
|
|