Skip to content

Commit

Permalink
Enhance GitHub Actions workflow for documentation deployment with imp…
Browse files Browse the repository at this point in the history
…roved caching, link verification, and Jekyll configuration
  • Loading branch information
jamesatomc committed Jan 12, 2025
1 parent d00d70a commit fef715a
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Rust
uses: actions-rs/toolchain@v1
Expand All @@ -30,18 +32,25 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
~/.cargo/bin/
~/.cargo/registry/
~/.cargo/git/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install mdBook
run: cargo install mdbook mdbook-linkcheck
run: |
if ! command -v mdbook &> /dev/null; then
cargo install mdbook mdbook-linkcheck
fi
- name: Verify links
run: |
cd documentation/book
mdbook test
continue-on-error: true

- name: Build Documentation
run: |
Expand All @@ -53,9 +62,17 @@ jobs:
test -d documentation/book/book || exit 1
test -f documentation/book/book/index.html || exit 1
- name: Configure Jekyll
run: |
echo "theme: jekyll-theme-cayman" > documentation/book/book/_config.yml
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./documentation/book/book
publish_branch: gh-pages
publish_branch: gh-pages
commit_message: "docs: update documentation site [skip ci]"
enable_jekyll: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'

0 comments on commit fef715a

Please sign in to comment.