Skip to content

Tweak GHA config #50

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

Merged
merged 5 commits into from
Jan 8, 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
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MDBOOK_VERSION=0.4.18
MDBOOK_LINKCHECK_VERSION=0.7.4
MDBOOK_TOC_VERSION=0.6.3
MDBOOK_VERSION=0.4.25
MDBOOK_LINKCHECK_VERSION=0.7.7
MDBOOK_TOC_VERSION=0.11.0

GIT_DEPLOY_DIR=book/html
GIT_DEPLOY_BRANCH=gh-pages
Expand Down
46 changes: 22 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,35 @@ on:

jobs:
book-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Read .env
id: mdbook-version
run: |
. ./.env
echo "::set-output name=MDBOOK_VERSION::${MDBOOK_VERSION}"
echo "::set-output name=MDBOOK_LINKCHECK_VERSION::${MDBOOK_LINKCHECK_VERSION}"
echo "::set-output name=MDBOOK_TOC_VERSION::${MDBOOK_TOC_VERSION}"
echo "MDBOOK_VERSION=${MDBOOK_VERSION}" >> $GITHUB_OUTPUT
echo "MDBOOK_LINKCHECK_VERSION=${MDBOOK_LINKCHECK_VERSION}" >> $GITHUB_OUTPUT
echo "MDBOOK_TOC_VERSION=${MDBOOK_TOC_VERSION}" >> $GITHUB_OUTPUT

- name: Cache binaries
id: mdbook-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
key: ${{ runner.os }}-${{ steps.mdbook-version.outputs.MDBOOK_VERSION }}--${{ steps.mdbook-version.outputs.MDBOOK_LINKCHECK_VERSION }}--${{ steps.mdbook-version.outputs.MDBOOK_TOC_VERSION }}

- name: Install latest stable Rust toolchain
if: steps.mdbook-cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
rustup update stable
rustup override set stable

- name: Install Dependencies
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
run: |
cargo install mdbook --version ${{ steps.mdbook-version.outputs.MDBOOK_VERSION }}
cargo install mdbook-linkcheck --version ${{ steps.mdbook-version.outputs.MDBOOK_LINKCHECK_VERSION }}
cargo install mdbook-toc --version ${{ steps.mdbook-version.outputs.MDBOOK_TOC_VERSION }}
Expand All @@ -45,36 +44,35 @@ jobs:
run: mdbook test

book-build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Read .env
id: mdbook-version
run: |
. ./.env
echo "::set-output name=MDBOOK_VERSION::${MDBOOK_VERSION}"
echo "::set-output name=MDBOOK_LINKCHECK_VERSION::${MDBOOK_LINKCHECK_VERSION}"
echo "::set-output name=MDBOOK_TOC_VERSION::${MDBOOK_TOC_VERSION}"
echo "MDBOOK_VERSION=${MDBOOK_VERSION}" >> $GITHUB_OUTPUT
echo "MDBOOK_LINKCHECK_VERSION=${MDBOOK_LINKCHECK_VERSION}" >> $GITHUB_OUTPUT
echo "MDBOOK_TOC_VERSION=${MDBOOK_TOC_VERSION}" >> $GITHUB_OUTPUT

- name: Cache binaries
id: mdbook-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
key: ${{ runner.os }}-${{ steps.mdbook-version.outputs.MDBOOK_VERSION }}--${{ steps.mdbook-version.outputs.MDBOOK_LINKCHECK_VERSION }}--${{ steps.mdbook-version.outputs.MDBOOK_TOC_VERSION }}

- name: Install latest stable Rust toolchain
if: steps.mdbook-cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
rustup update stable
rustup override set stable

- name: Install Dependencies
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
run: |
cargo install mdbook --version ${{ steps.mdbook-version.outputs.MDBOOK_VERSION }}
cargo install mdbook-linkcheck --version ${{ steps.mdbook-version.outputs.MDBOOK_LINKCHECK_VERSION }}
cargo install mdbook-toc --version ${{ steps.mdbook-version.outputs.MDBOOK_TOC_VERSION }}
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,35 @@ on:

jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Read .env
id: mdbook-version
run: |
. ./.env
echo "::set-output name=MDBOOK_VERSION::${MDBOOK_VERSION}"
echo "::set-output name=MDBOOK_LINKCHECK_VERSION::${MDBOOK_LINKCHECK_VERSION}"
echo "::set-output name=MDBOOK_TOC_VERSION::${MDBOOK_TOC_VERSION}"
echo "MDBOOK_VERSION=${MDBOOK_VERSION}" >> $GITHUB_OUTPUT
echo "MDBOOK_LINKCHECK_VERSION=${MDBOOK_LINKCHECK_VERSION}" >> $GITHUB_OUTPUT
echo "MDBOOK_TOC_VERSION=${MDBOOK_TOC_VERSION}" >> $GITHUB_OUTPUT

- name: Cache binaries
id: mdbook-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
key: ${{ runner.os }}-${{ steps.mdbook-version.outputs.MDBOOK_VERSION }}--${{ steps.mdbook-version.outputs.MDBOOK_LINKCHECK_VERSION }}--${{ steps.mdbook-version.outputs.MDBOOK_TOC_VERSION }}

- name: Install latest stable Rust toolchain
if: steps.mdbook-cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
rustup update stable
rustup override set stable

- name: Install Dependencies
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
run: |
cargo install mdbook --version ${{ steps.mdbook-version.outputs.MDBOOK_VERSION }}
cargo install mdbook-linkcheck --version ${{ steps.mdbook-version.outputs.MDBOOK_LINKCHECK_VERSION }}
cargo install mdbook-toc --version ${{ steps.mdbook-version.outputs.MDBOOK_TOC_VERSION }}
Expand Down