Skip to content
This repository was archived by the owner on Oct 27, 2023. It is now read-only.

Commit f15e680

Browse files
committed
ci: gh-pages with hugo and mdbook
1 parent f899361 commit f15e680

File tree

3 files changed

+22
-79
lines changed

3 files changed

+22
-79
lines changed

.github/workflows/gh-pages.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,44 @@
1+
# This needs the following setting:
2+
# Setttings > Actions > General > Workflow permissions
3+
# change to "Read and write permissions"
14
name: github pages
25

36
on:
47
push:
58
branches:
69
- master
10+
workflow_dispatch: null
711

812
jobs:
913
deploy:
1014
runs-on: ubuntu-latest
1115
steps:
1216
- uses: actions/checkout@v4
17+
with:
18+
submodules: true # could be useful in the future
19+
fetch-depth: 0 # we just need the latest commit
1320

1421
- name: Setup mdBook
1522
uses: peaceiris/actions-mdbook@v1
1623
with:
1724
mdbook-version: 'latest'
1825

19-
- run: mdbook build
26+
- name: Build mdbook
27+
working-directory: ./cookbook
28+
run: mdbook build --dest-dir "../site/static/book"
29+
30+
- name: Setup Hugo
31+
uses: peaceiris/actions-hugo@v2
32+
with:
33+
hugo-version: "latest"
34+
35+
- name: Build Hugo
36+
working-directory: ./site
37+
run: hugo --minify
2038

2139
- name: Deploy
2240
uses: peaceiris/actions-gh-pages@v3
41+
if: github.ref == 'refs/heads/master'
2342
with:
2443
github_token: ${{ secrets.GITHUB_TOKEN }}
25-
publish_dir: ./cookbook/book
44+
publish_dir: ./site/public

build.sh

-77
This file was deleted.

site/static/CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rust-bitcoin.org

0 commit comments

Comments
 (0)