File tree Expand file tree Collapse file tree 5 files changed +49
-3
lines changed Expand file tree Collapse file tree 5 files changed +49
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and deploy unstable book
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ paths :
8
+ - " book/**.md"
9
+ - " book/mkdocs.yml"
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ build :
14
+ name : Build and deploy
15
+ runs-on : ubuntu-latest
16
+ defaults :
17
+ run :
18
+ working-directory : book/
19
+ steps :
20
+ - name : Checkout
21
+ uses : actions/checkout@v3
22
+ with :
23
+ ssh-key : ${{ secrets.BOOK_DEPLOY_KEY }}
24
+ - name : Set up Python Virtualenv
25
+ uses : actions/setup-python@v4
26
+ with :
27
+ python-version : 3.9
28
+ - name : Install dependencies
29
+ run : make init
30
+ - name : Configure git
31
+ run : git config --global user.email "github-actions@github.com" && git config --global user.name "github-actions"
32
+ - name : Deploy unstable book
33
+ run : make deploy-unstable
Original file line number Diff line number Diff line change
1
+ [submodule "book/public "]
2
+ path = book/public
3
+ url = https://github.com/rust-nostr/rust-nostr.github.io.git
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
pip install -U poetry
3
3
poetry install
4
4
5
- build :
6
- poetry run mkdocs build --strict --clean --verbose
5
+ checkout :
6
+ git submodule update --init --recursive --remote
7
+
8
+ build : checkout
9
+ poetry run mkdocs build --strict --clean --verbose --site-dir public/book
10
+
11
+ deploy : build
12
+ cd public && git add book && git commit -m " Deploy book" && git push origin HEAD:master --force
13
+
14
+ deploy-unstable : checkout
15
+ poetry run mkdocs build --strict --clean --verbose --site-dir public/book-unstable
16
+ cd public && git add book-unstable && git commit -m " Deploy unstable book" && git push origin HEAD:master --force
7
17
8
18
serve :
9
19
mkdocs serve
You can’t perform that action at this time.
0 commit comments