Skip to content

Commit 682013c

Browse files
committed
rename userguide to compiler-userguide, add GHA
1 parent 03636e2 commit 682013c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+74
-13
lines changed

.github/workflows/mdbook.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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.51
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 Compiler User Guide with mdBook
44+
run: mdbook build
45+
working-directory: ./compiler-userguide
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: ./public
50+
51+
# Deployment job
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

compiler-userguide/book.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[book]
2+
authors = ["The Clash Developers"]
3+
language = "en"
4+
src = "src"
5+
title = "Clash Compiler User Guide"
6+
7+
[build]
8+
build-dir = "../public/compiler-userguide"
9+
10+
[output.html]
11+
site-url = "/compiler-userguide/"

0 commit comments

Comments
 (0)