mirror of
https://github.com/JonasunderscoreJones/docs.jonasjones.dev.git
synced 2025-10-22 10:39:18 +02:00
Merge pull request #3 from JonasunderscoreJones/workflows-additions
All checks were successful
build-docusaurus / build (push) Successful in 1m14s
All checks were successful
build-docusaurus / build (push) Successful in 1m14s
This commit is contained in:
commit
70f70bed29
2 changed files with 93 additions and 0 deletions
48
.forgejo/workflows/build-docusaurus.yml
Normal file
48
.forgejo/workflows/build-docusaurus.yml
Normal 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
45
.github/workflows/build-docusaurus.yml
vendored
Normal 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') }}
|
Loading…
Add table
Add a link
Reference in a new issue