mirror of https://github.com/astral-sh/ruff
Enable preview deployments for playground (#1383)
This commit is contained in:
parent
89cebe1ce2
commit
1a27992f47
|
|
@ -149,7 +149,7 @@ jobs:
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
${{ runner.os }}-build-
|
${{ runner.os }}-build-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
- uses: jetli/wasm-pack-action@v0.4.0
|
||||||
- run: wasm-pack test --node
|
- run: wasm-pack test --node
|
||||||
|
|
||||||
maturin-build:
|
maturin-build:
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
|
@ -11,7 +13,7 @@ env:
|
||||||
RUSTUP_MAX_RETRIES: 10
|
RUSTUP_MAX_RETRIES: 10
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
@ -26,20 +28,7 @@ jobs:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
cache-dependency-path: playground/package-lock.json
|
cache-dependency-path: playground/package-lock.json
|
||||||
- uses: actions/cache@v3
|
- uses: jetli/wasm-pack-action@v0.4.0
|
||||||
env:
|
|
||||||
cache-name: cache-cargo
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
- name: "Install wasm-pack"
|
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
||||||
- name: "Run wasm-pack"
|
- name: "Run wasm-pack"
|
||||||
run: wasm-pack build --target web --out-dir playground/src/pkg
|
run: wasm-pack build --target web --out-dir playground/src/pkg
|
||||||
- name: "Install Node dependencies"
|
- name: "Install Node dependencies"
|
||||||
|
|
@ -53,5 +42,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CF_ACCOUNT_ID }}
|
accountId: ${{ secrets.CF_ACCOUNT_ID }}
|
||||||
workingDirectory: playground
|
command: pages publish playground/dist --project-name=ruff --branch ${GITHUB_HEAD_REF} --commit-hash ${GITHUB_SHA}
|
||||||
command: pages publish dist --project-name=ruff
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue