From b6e22c069986064c5e253c60e5ab92f8274e6bd1 Mon Sep 17 00:00:00 2001 From: Jen Wardwell Date: Mon, 21 Oct 2024 09:06:02 -0700 Subject: [PATCH] [C] Update github actions --- .github/workflows/documentation.yml | 32 ++++++++++------------------- docusaurus.config.ts | 1 + package.json | 10 ++++----- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index fe8fa0b1c..0dd4e58e8 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -11,33 +11,28 @@ jobs: if: github.event_name != 'push' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: "12.x" + node-version-file: "package.json" + cache: "yarn" + - name: Install dependencies + run: yarn install --frozen-lockfile - name: Test Build env: ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }} GOOGLE_ANALYTICS: ${{ secrets.GOOGLE_ANALYTICS }} - run: | - if [ -e yarn.lock ]; then - yarn install --frozen-lockfile - elif [ -e package-lock.json ]; then - npm ci - else - npm i - fi - npm run build + run: yarn build gh-release: if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: "12.x" + node-version: "21.x" - name: Add key to allow access to repository env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock @@ -62,11 +57,6 @@ jobs: run: | git config --global user.email "actions@gihub.com" git config --global user.name "gh-actions" - if [ -e yarn.lock ]; then yarn install --frozen-lockfile - elif [ -e package-lock.json ]; then - npm ci - else - npm i - fi + yarn build npx docusaurus deploy diff --git a/docusaurus.config.ts b/docusaurus.config.ts index cdd70ba04..074ceeddb 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -37,6 +37,7 @@ const config: Config = { favicon: "favicon/favicon.svg", organizationName: "ManifoldScholar", projectName: "manifold-docusaurus", + trailingSlash: false, onBrokenLinks: 'warn', onBrokenMarkdownLinks: 'warn', plugins: [ diff --git a/package.json b/package.json index 6fcd51cd4..d96cdf4fd 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,10 @@ "name": "manifold-docusaurus", "version": "0.0.0", "private": true, + "engines": { + "node": "21.x" + }, + "packageManager": "yarn@4.5.0", "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", @@ -47,9 +51,5 @@ "last 1 firefox version", "last 1 safari version" ] - }, - "engines": { - "node": ">=21.0" - }, - "packageManager": "yarn@4.5.0" + } }