From 5d5417431a3fcdd4c9ea8d09df928c508b30d1c8 Mon Sep 17 00:00:00 2001 From: Will Crichton Date: Mon, 27 Jun 2022 15:16:41 -0700 Subject: [PATCH] Fix CI --- .github/workflows/main.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 35fe6fa..93dc541 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,18 +9,33 @@ jobs: with: toolchain: stable - uses: Swatinem/rust-cache@v1 - - run: npm install -g pnpm - - uses: actions-rs/cargo@v1 + - name: Install JS dependencies + run: npm install -g pnpm + - name: Test Rust package + uses: actions-rs/cargo@v1 + with: + command: test + - name: Lint Rust package + uses: actions-rs/cargo@v1 with: command: clippy # Build script in previous action should build js, # so we don't need to run pnpm build here. - - run: pnpm test && pnpm lint + - name: Test JS package + run: pnpm test && pnpm lint working-directory: js - - run: cargo install --path . --debug --locked - - run: mdbook build + - name: Install mdbook + run: | + mkdir bin + curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin + echo "$(pwd)/bin" >> ${GITHUB_PATH} + - name: Install mdbook-quiz + run: cargo install --path . --debug --locked + - name: Build example mdbook + run: mdbook build working-directory: example - - uses: peaceiris/actions-gh-pages@v3 + - name: Deploy to Github Pages + uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./example/book