Skip to content

added content upload modal #271

added content upload modal

added content upload modal #271

Workflow file for this run

name: Build and Check linting
on:
workflow_call:
inputs:
publish-artifact:
default: false
required: false
type: boolean
workflow_dispatch:
pull_request:
branches:
- main
jobs:
build_check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install prereqs
run: |
sudo apt-get install protobuf-compiler
- name: Rust Setup
uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
targets: "x86_64-unknown-linux-musl,wasm32-unknown-unknown"
components: "clippy,rustfmt"
- uses: cargo-bins/cargo-binstall@main
- name: cargo-leptos setup
run: cargo binstall --no-confirm cargo-leptos --version 0.2.16
- name: Cache rust dependencies and build output
uses: Swatinem/rust-cache@v2
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install npm deps
run: pnpm install
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: musl-tools # provides musl-gcc
version: 1.0
- name: lint check
run: |
cargo fmt --check
cargo clippy --no-deps --all-features --release -- -Dwarnings
- name: Build the Leptos project to `musl` output
run: cargo leptos build --release --lib-features release-lib --bin-features release-bin
env:
LEPTOS_BIN_TARGET_TRIPLE: x86_64-unknown-linux-musl
- run: touch .empty
- name: Archive production artifacts
uses: actions/upload-artifact@v3
if: ${{ inputs.publish-artifact }}
with:
name: build-musl
path: |
target/x86_64-unknown-linux-musl/release/hot-or-not-web-leptos-ssr
target/release/hash.txt
target/site
.empty