mirror of
https://github.com/JonasunderscoreJones/blog.jonasjones.dev.git
synced 2025-10-22 21:49:19 +02:00
added forgejo workflows script
This commit is contained in:
parent
9c1072c947
commit
4cad9cf5eb
1 changed files with 44 additions and 0 deletions
44
.forgejo/workflows/build-sveltekit.yml
Normal file
44
.forgejo/workflows/build-sveltekit.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
name: build-sveltekit
|
||||
on: [push, pull_request]
|
||||
|
||||
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
|
||||
node_modules
|
||||
key: ${{ runner.os }}-SvelteKit-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- 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: sveltekit-artifacts
|
||||
path: .svelte-kit/output/
|
||||
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
|
||||
node_modules
|
||||
key: ${{ runner.os }}-SvelteKit-${{ hashFiles('package-lock.json') }}
|
Loading…
Add table
Add a link
Reference in a new issue