Skip to content

Commit

Permalink
Upgrade docusaurus and GH workflows (#1660)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandratran committed Jul 25, 2024
1 parent 309adcd commit 35664f6
Show file tree
Hide file tree
Showing 9 changed files with 4,321 additions and 19,248 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/build-lint.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build and lint

on:
workflow_call:

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Build
uses: ConsenSys/docs-gha/build@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Check for lint, spelling and link errors

on:
workflow_call:

jobs:
lint:
name: Lint Code Base, Spelling, Link Check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Lint
uses: ConsenSys/docs-gha/lint@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

linkCheck:
name: Link Checking
runs-on: ubuntu-latest
strategy:
matrix:
file-extensions: [".md", ".mdx"]
steps:
- uses: actions/checkout@v4
- name: LinkCheck
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}
13 changes: 9 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@ jobs:
run: ${{ steps.download-actionlint.outputs.executable }} -color
shell: bash

build-lint:
name: Build and lint
uses: ./.github/workflows/build-lint.yml
build:
name: Build
uses: ./.github/workflows/build.yml

lint:
name: Lint
uses: ./.github/workflows/lint.yml

all-jobs-completed:
name: All jobs completed
runs-on: ubuntu-latest
needs:
- check-workflows
- build-lint
- build
- lint
outputs:
PASSED: ${{ steps.set-output.outputs.PASSED }}
steps:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/publish-main-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:
contents: write
steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install npm dependencies
run: yarn --immutable

- name: Run build script
run: yarn build
- name: npm build
shell: bash
run: |
npm ci --only=production
npm run build
- name: Deploy to `./` directory of `gh-pages` branch
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Update version
run: .github/scripts/update-version.sh
Expand Down
Loading

0 comments on commit 35664f6

Please sign in to comment.