-
Notifications
You must be signed in to change notification settings - Fork 80
39 lines (33 loc) · 1022 Bytes
/
main.yml
File metadata and controls
39 lines (33 loc) · 1022 Bytes
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Add explicit permissions - this is crucial!
permissions:
contents: write
jobs:
build:
name: Build, Test and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Important for git history
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install mdbook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- run: mdbook build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: book
branch: gh-pages
token: ${{ secrets.PAT }} # Explicitly use the token
clean: true # Clean up old files