ci: create install-node-dependencies action (#100)

This commit is contained in:
Marco Pasqualetti
2024-11-16 11:27:10 +01:00
committed by GitHub
parent 65faaf0183
commit 6d72ffb876
9 changed files with 7318 additions and 90 deletions
+8 -21
View File
@@ -13,19 +13,16 @@ on:
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: Check build documentation
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out code
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install NodeJS Dependencies
uses: ./.github/actions/install-node-dependencies
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
@@ -33,32 +30,22 @@ jobs:
- name: Install tuono
run: cargo install tuono@0.12.3
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build project
working-directory: ./apps/documentation
run: tuono build --static
fmt-lint-and-types:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: Check format and lint typescript
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out code
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
run: pnpm install
- name: Install NodeJS Dependencies
uses: ./.github/actions/install-node-dependencies
- name: Check formatting
run: pnpm docs:format:check