Skip to content

Commit

Permalink
Build web site through GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
imphil committed Nov 25, 2020
1 parent 4c469b1 commit de04c64
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pagebuild.yml
@@ -0,0 +1,27 @@
name: pagebuild

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Install packaged dependencies
run: sudo apt-get install python3 python3-venv python3-wheel latexmk texlive texlive-latex-extra texlive-fonts-extra

- name: Install Python dependencies
run: sudo pip3 install -r src/requirements.txt

- name: Build docs
run: ./build_website.sh

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
/_site
/src/*/build/
1 change: 1 addition & 0 deletions CNAME
@@ -0,0 +1 @@
wishbone-interconnect.org
18 changes: 18 additions & 0 deletions build_website.sh
@@ -0,0 +1,18 @@
#!/bin/sh

rm -fr _site/*

cp -r website/* _site

cp CNAME _site

mkdir -p _site/assets
mkdir -p _site/specs

make -C src/b3 html latexpdf
cp -r src/b3/build/html/ _site/specs/b3
cp src/b3/build/latex/wishbone-b3.pdf _site/assets

make -C src/b3.1 html latexpdf
cp -r src/b3.1/build/html/ _site/specs/b3.1
cp src/b3.1/build/latex/wishbone-b3-1.pdf _site/assets
4 changes: 2 additions & 2 deletions website/index.html
Expand Up @@ -32,7 +32,7 @@ <h5 class="card-header">Stable specifications</h5>
DRAM.

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

Expand Down Expand Up @@ -64,7 +64,7 @@ <h5 class="card-header">Upcoming Specifications and Contributing</h5>
</p>
<p class="card-text">

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

</p>
<p class="card-text">
Expand Down

0 comments on commit de04c64

Please sign in to comment.