mirror of
https://github.com/JonasunderscoreJones/docs.jonasjones.dev.git
synced 2025-10-22 18:49:18 +02:00
added auto-build workflow files
This commit is contained in:
parent
a4489e0389
commit
efe610fcd0
2 changed files with 89 additions and 0 deletions
39
.github/workflows/build-docusaurus.yml
vendored
Normal file
39
.github/workflows/build-docusaurus.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
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 ci
|
||||
|
||||
- name: Build Docusaurus site
|
||||
run: npm run 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') }}
|
Loading…
Add table
Add a link
Reference in a new issue