diff --git a/.github/workflows/install-mdbook/action.yml b/.github/workflows/install-mdbook/action.yml deleted file mode 100644 index 5560adc4..00000000 --- a/.github/workflows/install-mdbook/action.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Install mdbook and dependencies - -description: Install mdbook with the dependencies we need. - -runs: - using: composite - steps: - # The --locked flag is important for reproducible builds. - - name: Install mdbook - run: cargo install mdbook --locked --version 0.4.31 - shell: bash - - - name: Install mdbook-i18n-helpers - run: cargo install mdbook-i18n-helpers --locked --version 0.1.0 - shell: bash diff --git a/.github/workflows/setup-rust-cache/action.yml b/.github/workflows/setup-rust-cache/action.yml deleted file mode 100644 index f359ed35..00000000 --- a/.github/workflows/setup-rust-cache/action.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: Setup Rust cache - -description: Configure the rust-cache workflow. - -runs: - using: composite - steps: - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 6e112043..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: test -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - name: mdbook test - - steps: - - uses: actions/checkout@v3 - - - name: Install mdbook - run: | - mkdir mdbook - 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=./mdbook - echo `pwd`/mdbook >> $GITHUB_PATH - - - name: Run tests - run: mdbook test diff --git a/.github/workflows/mdbook.yml b/.github/workflows/vocs.yml similarity index 50% rename from .github/workflows/mdbook.yml rename to .github/workflows/vocs.yml index 8e648ef9..b846b4f7 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/vocs.yml @@ -1,7 +1,3 @@ -# Sample workflow for building and deploying a mdBook site to GitHub Pages -# -# To get started with mdBook see: https://rust-lang.github.io/mdBook/index.html -# name: Deploy mdBook site to Pages on: @@ -32,25 +28,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 8 - - name: Setup Rust cache - uses: ./.github/workflows/setup-rust-cache - - - name: Install mdbook - uses: ./.github/workflows/install-mdbook - - - name: Build in English - run: | - mdbook build -d book + - name: Use Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "pnpm" - - name: Build all translations - run: | - for po_lang in $(cat ./LANGUAGES); do - echo "::group::Building $po_lang translation" - MDBOOK_BOOK__LANGUAGE=$po_lang \ - mdbook build -d book/$po_lang - echo "::endgroup::" - done + - name: Install dependencies + run: cd dojo-book && pnpm install && pnpm run build - name: Setup Pages uses: actions/configure-pages@v3 @@ -58,7 +47,7 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: - path: ./book + path: ./dojo-book/docs/dist - name: Deploy to GitHub Pages id: deployment