Skip to content

Commit d696157

Browse files
committed
Build web site through GH actions
1 parent 4c469b1 commit d696157

File tree

5 files changed

+51
-2
lines changed

5 files changed

+51
-2
lines changed

.github/workflows/pagebuild.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: pagebuild
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Install packaged dependencies
15+
run: sudo apt-get install python3 python3-venv python3-wheel latexmk texlive texlive-latex-extra texlive-fonts-extra
16+
17+
- name: Install Python dependencies
18+
run: sudo pip3 install -r src/requirements.txt
19+
20+
- name: Build docs
21+
run: ./build_website.sh
22+
23+
- name: Deploy
24+
uses: peaceiris/actions-gh-pages@v3
25+
with:
26+
github_token: ${{ secrets.GITHUB_TOKEN }}
27+
publish_dir: ./_site

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/_site
2+
/src/*/build/

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wishbone-interconnect.org

build_website.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
3+
rm -fr _site/*
4+
mkdir _site
5+
6+
cp -r website/* _site
7+
8+
cp CNAME _site
9+
10+
mkdir -p _site/assets
11+
mkdir -p _site/specs
12+
13+
make -C src/b3 html latexpdf
14+
cp -r src/b3/build/html/ _site/specs/b3
15+
cp src/b3/build/latex/wishbone-b3.pdf _site/assets
16+
17+
make -C src/b3.1 html latexpdf
18+
cp -r src/b3.1/build/html/ _site/specs/b3.1
19+
cp src/b3.1/build/latex/wishbone-b3-1.pdf _site/assets

website/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h5 class="card-header">Stable specifications</h5>
3232
DRAM.
3333

3434
<ul>
35-
<li>Wishbone B.3 - <a href="/assets/wishbone-b3.pdf">pdf</a> <a href="/specs/b3/">html</a></li>
35+
<li>Wishbone B.3 - <a href="assets/wishbone-b3.pdf">pdf</a> <a href="specs/b3/">html</a></li>
3636
<li>Wishbone B.4 - <a href="https://github.com/fossi-foundation/wishbone/raw/master/documents/spec/wbspec_b4.pdf">pdf</a></li>
3737
</ul>
3838

@@ -64,7 +64,7 @@ <h5 class="card-header">Upcoming Specifications and Contributing</h5>
6464
</p>
6565
<p class="card-text">
6666

67-
Find the current state here: <a href="/assets/wishbone-b3-1.pdf">pdf</a> <a href="/specs/b3.1/">html</a>
67+
Find the current state here: <a href="assets/wishbone-b3-1.pdf">pdf</a> <a href="specs/b3.1/">html</a>
6868

6969
</p>
7070
<p class="card-text">

0 commit comments

Comments
 (0)