Merge pull request #3 from JonasunderscoreJones/workflows-additions
All checks were successful
build-docusaurus / build (push) Successful in 1m14s

This commit is contained in:
Jonas_Jones 2025-06-13 02:28:31 +02:00 committed by GitHub
commit 70f70bed29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,48 @@
name: build-docusaurus
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: docker
steps:
- name: checkout repository
uses: https://code.forgejo.org/actions/checkout@v4
- name: setup node
uses: https://github.com/actions/setup-node@v4
with:
node-version: 20
- name: restore cached dependencies
uses: https://code.forgejo.org/actions/cache/restore@v4
with:
path: |
~/.npm
docusaurus/node_modules
key: ${{ runner.os }}-Docusaurus
- name: install dependencies
run: npm install --frozen-lockfile
- name: build project
run: npm run build
- name: capture build artifacts
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: docusaurus-build-artifacts.zip
path: build
if-no-files-found: error
- name: cache downloaded dependencies
if: ${{ github.ref_name == github.event.repository.default_branch }}
uses: https://code.forgejo.org/actions/cache/save@v4
with:
path: |
~/.npm
docusaurus/node_modules
key: ${{ runner.os }}-Docusaurus

45
.github/workflows/build-docusaurus.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: build-sveltekit
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Restore npm cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm install --frozen-lockfile
- name: Build Docusaurus site
run: npm run build
- name: capture build artifacts
uses: actions/upload-artifact@v4
with:
name: docusaurus-build-artifacts
path: build
- name: Save npm cache
if: ${{ github.ref_name == github.event.repository.default_branch }}
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}