Skip to content

Commit 4b184c5

Browse files
committed
.github: Update Actions
1 parent bd05768 commit 4b184c5

File tree

1 file changed

+33
-31
lines changed

1 file changed

+33
-31
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
1-
# This is a basic workflow to help you get started with Actions
1+
name: Deploy mdBook site to Pages
22

3-
name: Auto gh-pages Deploy
4-
5-
# Controls when the action will run.
63
on:
74
push:
8-
branches: [ master ]
5+
branches: [main]
6+
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
913

10-
# Allows you to run this workflow manually from the Actions tab
11-
workflow_dispatch:
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: false
1219

13-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1420
jobs:
15-
# This workflow contains a single job called "build"
1621
build:
17-
# The type of runner that the job will run on
18-
runs-on: ubuntu-latest
19-
20-
# Steps represent a sequence of tasks that will be executed as part of the job
22+
runs-on: ubuntu-24.04
2123
steps:
22-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23-
- uses: actions/checkout@v2
24-
25-
- name: Setup mdBook
26-
uses: peaceiris/actions-mdbook@v1
24+
- uses: actions/checkout@v4
25+
- uses: peaceiris/actions-mdbook@v2
2726
with:
28-
mdbook-version: 'latest'
29-
30-
- name: Build mdbook
31-
run: mdbook build
32-
33-
- name: Deploy gh-pages
34-
uses: peaceiris/actions-gh-pages@v3
27+
mdbook-version: latest
28+
- id: pages
29+
uses: actions/configure-pages@v5
30+
- run: mdbook build
31+
- uses: actions/upload-pages-artifact@v3
3532
with:
36-
github_token: ${{ secrets.GITHUB_TOKEN }}
37-
publish_dir: ./book
38-
user_name: 'github-actions[bot]'
39-
user_email: 'github-actions[bot]@users.noreply.github.com'
40-
commit_message: 'Auto Deploy (${{ github.event.head_commit.message }})'
41-
cname: doc.rust-kr.org
33+
path: ./book
34+
35+
deploy:
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
runs-on: ubuntu-24.04
40+
needs: build
41+
steps:
42+
- id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)