Remove extra line #345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy website via GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
working-directory: website | |
jobs: | |
deploy: | |
name: Deploy p2panda website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Cache Node.js modules | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build website | |
run: npm run build | |
- name: Deploy website | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/build | |
cname: p2panda.org | |
deploy-js-docs: | |
name: Deploy p2panda-js API documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout p2panda-js repository | |
uses: actions/checkout@v3 | |
with: | |
repository: 'p2panda/p2panda' | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Setup Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
override: true | |
- name: Install wasm-bindgen | |
uses: jetli/wasm-bindgen-action@v0.1.0 | |
- name: Install wasm-opt | |
uses: giantswarm/install-binary-action@v1 | |
with: | |
binary: "wasm-opt" | |
version: "109" | |
download_url: "https://github.com/WebAssembly/binaryen/releases/download/version_${version}/binaryen-version_${version}-x86_64-linux.tar.gz" | |
tarball_binary_path: "*/bin/${binary}" | |
smoke_test: "${binary} --version" | |
- name: Install dependencies | |
run: npm ci | |
working-directory: p2panda-js | |
- name: Compile wasm and build p2panda-js | |
run: npm run build | |
working-directory: p2panda-js | |
- name: Build documentation page | |
run: npm run docs | |
working-directory: p2panda-js | |
- name: Deploy website | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: p2panda-js/docs | |
destination_dir: lib/p2panda-js |