Skip to content

Commit f796fcb

Browse files
authored
Fix deployment of mdbook export to GitHub pages (#397)
* Update GitHub Action workflows This fixes the deployment. * Fix links in SUMMARY * Also run mdbook build on every PR This should save us from failing builds in the future.
1 parent 62f6859 commit f796fcb

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

.github/workflows/gh-pages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
- main
77
jobs:
88
deploy:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-24.04
1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
- name: Setup mdBook
15-
uses: peaceiris/actions-mdbook@v1
15+
uses: peaceiris/actions-mdbook@v2
1616
with:
1717
mdbook-version: 'latest'
1818
- name: Emojify Book
@@ -23,7 +23,7 @@ jobs:
2323
find . -type f -name "*.md" -exec ./gh-actions-emojitsu emojify -i {} \;
2424
- run: mdbook build
2525
- name: Deploy
26-
uses: peaceiris/actions-gh-pages@v3
26+
uses: peaceiris/actions-gh-pages@v4
2727
with:
2828
github_token: ${{ secrets.GITHUB_TOKEN }}
2929
publish_dir: ./book

.github/workflows/linting.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,27 @@ on:
99
- main
1010
jobs:
1111
lint:
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-24.04
1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.ref }}
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- uses: ruby/setup-ruby@v1
1818
with:
1919
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
2020
- run: bin/check
21+
build-mdbook:
22+
runs-on: ubuntu-24.04
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Setup mdBook
26+
uses: peaceiris/actions-mdbook@v2
27+
with:
28+
mdbook-version: 'latest'
29+
- name: Emojify Book
30+
run: |
31+
set -x
32+
wget --no-verbose https://github.com/shonfeder/emojitsu/releases/download/0.1.1/gh-actions-emojitsu
33+
chmod +x gh-actions-emojitsu
34+
find . -type f -name "*.md" -exec ./gh-actions-emojitsu emojify -i {} \;
35+
- run: mdbook build

SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
- [Push to Git Repository](ruby_on_rails/first_git_push.md)
2020
- [Initialise Gitflow](ruby_on_rails/initialise_gitflow.md)
2121
- [Configure Git Repository](configure_git_repository.md)
22-
- [Create an Application Server](ruby_on_rails/create_application_server.md)
22+
- [Create an Application Server (Heroku)](ruby_on_rails/create_application_server_heroku.md)
23+
- [Create an Application Server (Deploio)](ruby_on_rails/create_application_server_deploio.md)
2324
- [Configure the CI/CD](ruby_on_rails/configure_ci.md)
2425
- [Tools]()
2526
- [RSpec](ruby_on_rails/rspec.md)

0 commit comments

Comments
 (0)