|
1 | 1 | name: Website |
| 2 | + |
2 | 3 | on: |
3 | 4 | pull_request: {} |
4 | 5 | push: |
|
7 | 8 |
|
8 | 9 | permissions: |
9 | 10 | contents: read |
| 11 | + id-token: write |
| 12 | + pages: write |
10 | 13 |
|
11 | 14 | concurrency: |
12 | 15 | group: ${{ github.workflow }}-${{ github.ref }} |
13 | 16 | cancel-in-progress: false |
14 | 17 |
|
15 | 18 | jobs: |
16 | | - book-test: |
17 | | - name: Test Book |
18 | | - runs-on: ubuntu-latest |
19 | | - |
20 | | - steps: |
21 | | - - uses: actions/checkout@v6 |
22 | | - |
23 | | - - name: Set up Rust toolchain |
24 | | - uses: actions-rust-lang/setup-rust-toolchain@v1 |
25 | | - |
26 | | - - name: Install Cargo Binary Install |
27 | | - uses: cargo-bins/cargo-binstall@main |
28 | | - |
29 | | - - name: Install mdBook |
30 | | - run: cargo binstall --force -y mdbook mdbook-tabs |
31 | | - |
32 | | - - name: Clean dependencies |
33 | | - run: cargo clean -p fortifier -p regex |
34 | | - |
35 | | - - name: Build dependencies |
36 | | - run: cargo build -p fortifier --features all-validations -p regex |
37 | | - |
38 | | - - name: Run tests |
39 | | - run: mdbook test -L ../target/debug/deps |
40 | | - working-directory: book |
41 | | - |
42 | | - book-build: |
43 | | - name: Build Book |
44 | | - needs: book-test |
45 | | - runs-on: ubuntu-latest |
46 | | - |
47 | | - steps: |
48 | | - - uses: actions/checkout@v6 |
49 | | - with: |
50 | | - fetch-depth: 0 |
51 | | - |
52 | | - - name: Set up Rust toolchain |
53 | | - uses: actions-rust-lang/setup-rust-toolchain@v1 |
54 | | - |
55 | | - - name: Install Cargo Binary Install |
56 | | - uses: cargo-bins/cargo-binstall@main |
57 | | - |
58 | | - - name: Install mdBook |
59 | | - run: cargo binstall --force -y mdbook mdbook-tabs |
60 | | - |
61 | | - - name: Install Node.js dependencies |
62 | | - run: npm install |
63 | | - |
64 | | - - name: Build Book |
65 | | - run: mdbook build |
66 | | - working-directory: book |
67 | | - |
68 | | - - name: Upload artifact |
69 | | - uses: actions/upload-artifact@v7 |
70 | | - with: |
71 | | - name: book |
72 | | - path: book/book |
73 | | - retention-days: 1 |
74 | | - if-no-files-found: error |
75 | | - |
76 | | - deploy: |
77 | | - name: Deploy |
78 | | - needs: book-build |
79 | | - if: github.ref == 'refs/heads/main' |
80 | | - runs-on: ubuntu-latest |
81 | | - |
82 | | - permissions: |
83 | | - contents: read |
84 | | - pages: write |
85 | | - id-token: write |
86 | | - |
87 | | - steps: |
88 | | - - uses: actions/checkout@v6 |
89 | | - with: |
90 | | - fetch-depth: 0 |
91 | | - |
92 | | - - name: Download artifacts |
93 | | - uses: actions/download-artifact@v8 |
94 | | - with: |
95 | | - path: dist |
96 | | - merge-multiple: true |
97 | | - |
98 | | - - name: Setup Pages |
99 | | - uses: actions/configure-pages@v6 |
100 | | - |
101 | | - - name: Upload artifact |
102 | | - uses: actions/upload-pages-artifact@v5 |
103 | | - with: |
104 | | - path: dist |
105 | | - |
106 | | - - name: Deploy to GitHub Pages |
107 | | - id: deployment |
108 | | - uses: actions/deploy-pages@v5 |
| 19 | + book: |
| 20 | + name: Book |
| 21 | + uses: RustForWeb/.github/.github/workflows/book.yml@d6e6ead9b4da3d70245d3ee4e06fe339244bb200 |
| 22 | + with: |
| 23 | + combine: false |
| 24 | + clean-options: '-p fortifier -p regex' |
| 25 | + build-options: '-p fortifier --features all-validations -p regex' |
0 commit comments