Skip to content

Reactivity v3! (Part 1) 🎉 #2156

Reactivity v3! (Part 1) 🎉

Reactivity v3! (Part 1) 🎉 #2156

Workflow file for this run

name: Build website
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
deploy:
name: Deploy Draft
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install trunk
run: >
wget -qO-
https://github.com/thedodd/trunk/releases/download/v0.16.0/trunk-x86_64-unknown-linux-gnu.tar.gz
| tar -xzf- && sudo mv trunk /usr/bin/
- name: Cargo generate-lockfile
run: cargo generate-lockfile
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build website
run: >
cd website/ && npm ci && npm run prod
- name: Build examples
run: |
output="$(pwd)/website/dist"
mkdir "$output/examples"
for path in examples/*; do
if [[ ! -d $path ]]; then
continue
fi
example=$(basename "$path")
echo "building: $example"
(
cd "$path"
dist_dir="$output/examples/$example"
mkdir "$dist_dir"
trunk build --release --dist "$dist_dir" --public-url "/examples/$example"
)
done
- name: Build rustdocs
run: |
cd packages/sycamore && cargo doc --no-deps --all-features
cd ../sycamore-core && cargo doc --no-deps --all-features
cd ../sycamore-futures && cargo doc --no-deps --all-features
cd ../sycamore-macro && cargo doc --no-deps --all-features
cd ../sycamore-reactive && cargo doc --no-deps --all-features
cd ../sycamore-router && cargo doc --no-deps --all-features
cd ../sycamore-router-macro && cargo doc --no-deps --all-features
cd ../sycamore-web && cargo doc --no-deps --all-features
cd ../../
cp -r target/doc website/dist/api
- name: Create .nojekyll file
run: touch website/dist/.nojekyll
- name: Deploy to netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.DEV_NETLIFY_SITE_ID }}
with:
args: deploy