Skip to content

Commit e1fecac

Browse files
authored
Create mdbook.yml
1 parent 18fe94c commit e1fecac

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed

.github/workflows/mdbook.yml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# Sample workflow for building and deploying a mdBook site to GitHub Pages
2+
#
3+
# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html
4+
#
5+
name: Deploy mdBook site to Pages
6+
7+
on:
8+
# Runs on pushes targeting the default branch
9+
push:
10+
branches: ["main"]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: false
26+
27+
jobs:
28+
# Build job
29+
build:
30+
runs-on: ubuntu-latest
31+
env:
32+
MDBOOK_VERSION: 0.4.36
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Install mdBook
36+
run: |
37+
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
38+
rustup update
39+
cargo install --version ${MDBOOK_VERSION} mdbook
40+
- name: Setup Pages
41+
id: pages
42+
uses: actions/configure-pages@v5
43+
- name: Build with mdBook
44+
run: mdbook build
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: ./book
49+
50+
# Deployment job
51+
deploy:
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
57+
- name: Cache
58+
uses: actions/cache@v5.0.4
59+
with:
60+
# A list of files, directories, and wildcard patterns to cache and restore
61+
path:
62+
# An explicit key for restoring and saving the cache
63+
key:
64+
# An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.
65+
restore-keys: # optional
66+
# The chunk size used to split up large files during upload, in bytes
67+
upload-chunk-size: # optional
68+
# An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms
69+
enableCrossOsArchive: # optional, default is false
70+
# Fail the workflow if cache entry is not found
71+
fail-on-cache-miss: # optional, default is false
72+
# Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache
73+
lookup-only: # optional, default is false
74+
# Run the post step to save the cache even if another step before fails
75+
save-always: # optional, default is false
76+
77+
needs: build
78+
steps:
79+
- name: Deploy to GitHub Pages
80+
id: deployment
81+
uses: actions/deploy-pages@v5
82+
83+
- name: Setup Java JDK
84+
uses: actions/setup-java@v5.2.0
85+
with:
86+
# The Java version to set up. Takes a whole or semver Java version. See examples of supported syntax in README file
87+
java-version: # optional
88+
# The path to the `.java-version` file. See examples of supported syntax in README file
89+
java-version-file: # optional
90+
# Java distribution. See the list of supported distributions in README file
91+
distribution:
92+
# The package type (jdk, jre, jdk+fx, jre+fx)
93+
java-package: # optional, default is jdk
94+
# The architecture of the package (defaults to the action runner's architecture)
95+
architecture: # optional
96+
# Path to where the compressed JDK is located
97+
jdkFile: # optional
98+
# Set this option if you want the action to check for the latest available version that satisfies the version spec
99+
check-latest: # optional
100+
# ID of the distributionManagement repository in the pom.xml file. Default is `github`
101+
server-id: # optional, default is github
102+
# Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR
103+
server-username: # optional, default is GITHUB_ACTOR
104+
# Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN
105+
server-password: # optional, default is GITHUB_TOKEN
106+
# Path to where the settings.xml file will be written. Default is ~/.m2.
107+
settings-path: # optional
108+
# Overwrite the settings.xml file if it exists. Default is "true".
109+
overwrite-settings: # optional, default is true
110+
# GPG private key to import. Default is empty string.
111+
gpg-private-key: # optional
112+
# Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE.
113+
gpg-passphrase: # optional
114+
# Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".
115+
cache: # optional
116+
# The path to a dependency file: pom.xml, build.gradle, build.sbt, etc. This option can be used with the `cache` option. If this option is omitted, the action searches for the dependency file in the entire repository. This option supports wildcards and a list of file names for caching multiple dependencies.
117+
cache-dependency-path: # optional
118+
# Workaround to pass job status to post job step. This variable is not intended for manual setting
119+
job-status: # optional, default is ${{ job.status }}
120+
# The token used to authenticate when fetching version manifests hosted on github.com, such as for the Microsoft Build of OpenJDK. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
121+
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
122+
# Name of Maven Toolchain ID if the default name of "${distribution}_${java-version}" is not wanted. See examples of supported syntax in Advanced Usage file
123+
mvn-toolchain-id: # optional
124+
# Name of Maven Toolchain Vendor if the default name of "${distribution}" is not wanted. See examples of supported syntax in Advanced Usage file
125+
mvn-toolchain-vendor: # optional
126+
- name: Setup Go environment
127+
uses: actions/setup-go@v6.4.0
128+
with:
129+
# The Go version to download (if necessary) and use. Supports semver spec and ranges. Be sure to enclose this option in single quotation marks.
130+
go-version: # optional
131+
# Path to the go.mod, go.work, .go-version, or .tool-versions file.
132+
go-version-file: # optional
133+
# Set this option to true if you want the action to always check for the latest available version that satisfies the version spec
134+
check-latest: # optional
135+
# Used to pull Go distributions from go-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
136+
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
137+
# Used to specify whether caching is needed. Set to true, if you'd like to enable caching.
138+
cache: # optional, default is true
139+
# Used to specify the path to a dependency file (e.g., go.mod, go.sum)
140+
cache-dependency-path: # optional
141+
# Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.
142+
architecture: # optional
143+
# Custom base URL for downloading Go distributions. Use this to download Go from a mirror or custom source. Defaults to "https://go.dev/dl". Can also be set via the GO_DOWNLOAD_BASE_URL environment variable. The input takes precedence over the environment variable.
144+
go-download-base-url: # optional
145+
- name: Setup .NET Core SDK
146+
uses: actions/setup-dotnet@v5.2.0
147+
with:
148+
# Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx
149+
dotnet-version: # optional
150+
# Optional quality of the build. The possible values are: daily, signed, validated, preview, ga.
151+
dotnet-quality: # optional
152+
# Optional global.json location, if your global.json isn't located in the root of the repo.
153+
global-json-file: # optional
154+
# Optional package source for which to set up authentication. Will consult any existing NuGet.config in the root of the repo and provide a temporary NuGet.config using the NUGET_AUTH_TOKEN environment variable as a ClearTextPassword
155+
source-url: # optional
156+
# Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository's owner. Only used if a GPR URL is also provided in source-url
157+
owner: # optional
158+
# Optional NuGet.config location, if your NuGet.config isn't located in the root of the repo.
159+
config-file: # optional
160+
# Optional input to enable caching of the NuGet global-packages folder
161+
cache: # optional
162+
# Used to specify the path to a dependency file: packages.lock.json. Supports wildcards or a list of file names for caching multiple dependencies.
163+
cache-dependency-path: # optional
164+
# Optional SDK workloads to install for additional platform support. Examples: wasm-tools, maui, aspire.
165+
workloads: # optional
166+
# Optional architecture for the .NET install. Supported values: x64, x86, arm64, amd64, arm, s390x, ppc64le, riscv64. If not set, the installer auto-detects the current system architecture.
167+
architecture: # optional
168+
- name: First interaction
169+
uses: actions/first-interaction@v1.3.0
170+
with:
171+
# Token for the repository. Can be passed in using {{ secrets.GITHUB_TOKEN }}
172+
repo-token:
173+
# Comment to post on an individual's first issue
174+
issue-message: # optional
175+
# Comment to post on an individual's first pull request
176+
pr-message: # optional
177+

0 commit comments

Comments
 (0)