diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..1ec10c4 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: 'main' + +jobs: + build_site: + runs-on: ubuntu-latest + container: jimfx/nodes:latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: pnpm install + + - name: build + run: pnpm run build + + - name: Upload Artifacts + uses: actions/upload-pages-artifact@v3 + with: + # this should match the `pages` option in your adapter-static options + path: 'app/build/' diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f653e2b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:21 + +# IMAGE CUSTOMISATIONS + +# Install rust +# https://github.com/rust-lang/rustup/issues/1085 +RUN RUSTUP_URL="https://sh.rustup.rs" \ + && curl --silent --show-error --location --fail --retry 3 --proto '=https' --tlsv1.2 --output /tmp/rustup-linux-install.sh $RUSTUP_URL \ + && bash /tmp/rustup-linux-install.sh -y + +ENV PATH=/root/.cargo/bin:$PATH + +RUN rustup target add wasm32-unknown-unknown \ + && cargo install wasm-pack \ + && npm i -g pnpm + diff --git a/package.json b/package.json index 2d5a0bc..c78602a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,7 @@ { "scripts": { + "build": "pnpm build:nodes && pnpm build:app", + "build:app": "pnpm -r --filter 'app' build", "build:nodes": "pnpm -r --filter './nodes/**' build", "dev:nodes": "pnpm -r --parallel --filter './nodes/**' dev", "dev": "pnpm -r --filter 'app' --filter './packages/node-registry' dev"