-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (45 loc) · 1.4 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container: devkitpro/devkitarm
steps:
- name: Checkout branch
uses: actions/checkout@v4
- 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
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
uses: actions/upload-pages-artifact@v2
with:
path: ./target/armv6k-nintendo-3ds/doc
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