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

Automatically add exercise section. #52

Merged
merged 8 commits into from
May 24, 2024
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
42 changes: 31 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,20 @@ on:
- main

jobs:
formatter:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dprint/[email protected]

check-links:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install plugin
run: cargo install --path helpers/mdbook-exercise-linker
- uses: taiki-e/install-action@v2
with:
tool: mdbook
- name: Build book
run: |
cd book
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=.
./mdbook build
mdbook build
- name: Link Checker
uses: lycheeverse/lychee-action@v1
with:
Expand All @@ -34,3 +32,25 @@ jobs:
--require-https
--no-progress
book/book
# Upload the book as an artifact
- uses: actions/upload-artifact@v4
with:
name: book
path: book/book
# Commit and push all changed files.
# Must only affect files that are listed in "paths-ignore".
- name: Git commit build artifacts
# Only run on main branch push (e.g. pull request merge).
if: github.event_name == 'push'
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
git add --force book/book
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push --set-upstream --force-with-lease origin deploy

formatter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dprint/[email protected]
Loading
Loading