Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish book to github pages on new releases #264

Merged
merged 3 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ jobs:
with:
mdbook-version: '0.4.35'
- name: Install mdbook-keeper
run: cargo install mdbook-keeper --git https://github.com/tfpk/mdbook-keeper/ --rev 12f116d0840c69a6786dba3865768af3fde634f3
run: cargo install mdbook-keeper --git https://github.com/tfpk/mdbook-keeper/ --rev 12f116d0840c69a6786dba3865768af3fde634f3 --force
- name: Run mdbook build (tests all code snippets)
run: CARGO_MANIFEST_DIR=. mdbook build book
38 changes: 38 additions & 0 deletions .github/workflows/publish-book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: publish book

on:
push:
tags:
- 'v*.*.*'

jobs:
publish-book:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-mdbook-publish-${{ hashFiles('**/Cargo.toml') }}
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install mdbook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.35'
- name: Install mdbook-keeper
run: cargo install mdbook-keeper --git https://github.com/tfpk/mdbook-keeper/ --rev 12f116d0840c69a6786dba3865768af3fde634f3 --force
- name: build book
run: CARGO_MANIFEST_DIR=. mdbook build book
- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book
1 change: 1 addition & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
steps:
- uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.PAT }}
release-type: rust
package-name: bevy_ecs_ldtk
bump-minor-pre-major: true
Expand Down