Skip to content

Commit

Permalink
feat(docs): add instructions for adding papers and build the site in …
Browse files Browse the repository at this point in the history
…GitHub actions (hydro-project#796)
  • Loading branch information
shadaj authored and MingweiSamuel committed Jun 30, 2023
1 parent e423cf7 commit 69abd97
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,20 @@ jobs:
command: clippy
args: --all-targets -- -D warnings

build-website:
name: Build Website
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.event_name != 'pull_request' }}
timeout-minutes: 25
needs: pre_job
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Build Website
run: bash build_docs.bash x86_64-linux-gnu-ubuntu-20.04

docs:
name: Docs (rustdoc)
timeout-minutes: 10
Expand Down
6 changes: 4 additions & 2 deletions build_docs.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
set -e

wget -qO- https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz | tar xJ
PLATFORM=${1:-"x86_64-linux-gnu-ubuntu-16.04"}

wget -qO- https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-$PLATFORM.tar.xz | tar xJ

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Expand All @@ -10,7 +12,7 @@ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

cd website_playground

CARGO_CFG_HYDROFLOW_GENERATE_DOCS="1" RUSTFLAGS="--cfg procmacro2_semver_exempt" CC="$PWD/../clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang" wasm-pack build
CARGO_CFG_HYDROFLOW_GENERATE_DOCS="1" RUSTFLAGS="--cfg procmacro2_semver_exempt" CC="$PWD/../clang+llvm-13.0.0-$PLATFORM/bin/clang" wasm-pack build

cd ../docs

Expand Down
5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ Finally, you can run the website locally:
```bash
$ npm run start
```

## Adding Papers
1. Upload the paper PDF to the `static/papers` folder.
2. Run the script `./extract-paper-thumbnails` (from this `docs` directory), which requires [ImageMagick to be installed](https://imagemagick.org/script/download.php).
3. Go to `src/pages/research.js` and add the paper to the array at the top of the file.

0 comments on commit 69abd97

Please sign in to comment.