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

Update GitHub actions to all be Node20+ #271

Merged
merged 1 commit into from
Feb 29, 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
31 changes: 16 additions & 15 deletions .github/workflows/common/set-up-mdbook/action.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
name: "Install mdBook with Plugins"
description: 'Shared action steps to install mdBook with required plugins'
description: "Shared action steps to install mdBook with required plugins"
inputs:
token:
description: "Pass through for secrets.GITHUB_TOKEN"
required: true
runs:
using: "composite"
steps:
- name: Setup mdBook 📚
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea
uses: jontze/action-mdbook@0765bef0c7c5792f93bf3ed3d487a0ca32c9da33
with:
mdbook-version: 'latest'
token: ${{ inputs.token }}
mdbook-version: "~0.4.37" # Use a semver compatible string
# Optional Plugins have to be enabled
use-linkcheck: true
linkcheck-version: "~0.7.7"

- name: Install mdbook-linkcheck plugin
- name: Show mdbook version
shell: bash
run: |
curl -s https://api.github.com/repos/Michael-F-Bryan/mdbook-linkcheck/releases/latest \
| grep browser_download_url \
| grep $(rustc -Vv | grep host | cut -d' ' -f2) \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi - -O mdbook-linkcheck.zip

unzip mdbook-linkcheck.zip -d mdbook-linkcheck
chmod +x mdbook-linkcheck/mdbook-linkcheck
echo "$PWD/mdbook-linkcheck" >> $GITHUB_PATH
run: mdbook --version
- name: Show linkchecker version
shell: bash
run: mdbook-linkcheck --version
8 changes: 5 additions & 3 deletions .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
on:
push:
tags:
- '[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9][0-9]'
- "[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9][0-9]"

permissions:
contents: read
Expand All @@ -19,6 +19,8 @@ jobs:

- name: Set up mdBook 📚
uses: ./.github/workflows/common/set-up-mdbook
with:
token: ${{secrets.GITHUB_TOKEN}}

- name: Setup Pages
id: pages
Expand All @@ -28,7 +30,7 @@ jobs:
run: mdbook build

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ./book/html

Expand All @@ -42,4 +44,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v4
12 changes: 7 additions & 5 deletions .github/workflows/verify-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: Verify PR

on:
pull_request:
branches:
branches:
- main

jobs:
verify:
runs-on: ubuntu-20.04
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js 🐰
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Install Node Modules 💾
run: npm ci
Expand All @@ -25,6 +25,8 @@ jobs:

- name: Set up mdBook 📚
uses: ./.github/workflows/common/set-up-mdbook

with:
token: ${{secrets.GITHUB_TOKEN}}

- name: Build mdBook 📚
run: mdbook build