rust-search-extension/.github/workflows/build-index.yml
2021-10-16 22:44:21 +08:00

27 lines
1.1 KiB
YAML

name: Build index
on:
workflow_dispatch:
jobs:
build:
name: Build index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Build index"
run: |
cd rust
RUST_BACKTRACE=full cargo run --target-dir /tmp --manifest-path=Cargo.toml books -d /tmp/books.js
RUST_BACKTRACE=full cargo run --target-dir /tmp --manifest-path=Cargo.toml lints -d /tmp/lints.js
RUST_BACKTRACE=full cargo run --target-dir /tmp --manifest-path=Cargo.toml labels -d /tmp/labels.js
git clone --depth 1 https://github.com/jplatte/caniuse.rs.git /tmp/caniuse
RUST_BACKTRACE=full cargo run --target-dir /tmp --manifest-path=Cargo.toml caniuse -r /tmp/caniuse -d /tmp/caniuse.js
git clone --depth 1 https://github.com/nrc/rfc-index.git /tmp/rfc-index
RUST_BACKTRACE=full cargo run --target-dir /tmp --manifest-path=Cargo.toml rfcs -r /tmp/rfc-index -d /tmp/rfcs.js
zip /tmp/index.zip /tmp/*.js
- name: "Upload Index Artifact"
uses: actions/upload-artifact@master
with:
name: index.zip
path: /tmp/index.zip