From 33e833d7f5535517e976ad03918ea5f90853f20c Mon Sep 17 00:00:00 2001 From: Will Crichton Date: Wed, 15 May 2024 13:33:14 -0700 Subject: [PATCH] Update CI --- .github/workflows/main.yml | 2 ++ .github/workflows/release.yml | 17 ++++++----------- .github/workflows/setup/action.yaml | 6 ++++++ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f608b28..72fc9b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,8 @@ jobs: - name: Test JS package run: depot test working-directory: js + - name: Install mdbook-quiz + run: cargo install --path crates/mdbook-quiz --debug --locked - name: Build example mdbook run: mdbook build working-directory: example/mdbook diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d66e74..b206a6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,23 +91,18 @@ jobs: # This ensures that the `crates/mdbook-quiz/js/` directory is # populated before running publish - name: Cargo build - run: cargo build + run: cargo build + - name: Install mdbook-quiz + run: cargo install --path crates/mdbook-quiz --debug --locked + - name: Build example mdbook + run: mdbook build + working-directory: example/mdbook - name: Cargo release run: cargo workspaces publish --from-git --yes --allow-dirty --token ${{ secrets.CARGO_TOKEN }} - uses: JS-DevTools/npm-publish@v1 with: token: ${{ secrets.NPM_TOKEN }} package: ./js/packages/quiz/package.json - - 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 crates/mdbook-quiz --debug --locked - - name: Build example mdbook - run: mdbook build - working-directory: example/mdbook - name: Deploy to Github Pages uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.github/workflows/setup/action.yaml b/.github/workflows/setup/action.yaml index a63e3b0..9f210f3 100644 --- a/.github/workflows/setup/action.yaml +++ b/.github/workflows/setup/action.yaml @@ -24,6 +24,12 @@ runs: curl https://raw.githubusercontent.com/cognitive-engineering-lab/depot/main/scripts/install.sh | sh echo "$HOME/.local/bin" >> ${GITHUB_PATH} shell: bash + - 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} + shell: bash - name: Initialize TS bindings run: cargo make init-bindings shell: bash \ No newline at end of file