Skip to content

Commit f568574

Browse files
authored
Merge pull request #156 from trifectatechfoundation/gh-pages
Build and deploy for GH pages
2 parents 0e52d69 + 07a7c23 commit f568574

File tree

16 files changed

+8789
-44
lines changed

16 files changed

+8789
-44
lines changed

.github/workflows/build-deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and deploy
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: '22'
15+
cache: 'npm'
16+
cache-dependency-path: 'slides/package-lock.json'
17+
18+
- run: npm ci
19+
working-directory: slides
20+
- run: ./build.sh
21+
working-directory: slides
22+
23+
- uses: peaceiris/actions-mdbook@v2
24+
with:
25+
mdbook-version: '0.4.52'
26+
- run: mdbook build
27+
28+
- uses: actions/configure-pages@v5
29+
- uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: public/
32+
33+
deploy:
34+
needs: build
35+
permissions:
36+
pages: write
37+
id-token: write
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
target/
1+
public/
2+
slides/index.html
3+
slides/dist/
4+
slides/node_modules/

.vscode/extensions.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

book.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
authors = ["Henk Oordt", "Marc Schoolderman", "Folkert de Vries", "Ruben Nijveld"]
33
title = "Teach-rs - Exercises"
44

5-
src = "."
5+
src = "book"
66
language = "en"
77
multilingual = false
88

99
[build]
10-
build-dir = "./target/book"
10+
build-dir = "public"

book/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CONTRIBUTING.md

book/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md
File renamed without changes.

book/assets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../assets/

book/exercises

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../exercises/

0 commit comments

Comments
 (0)