44 lines
No EOL
1 KiB
YAML
44 lines
No EOL
1 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
container:
|
|
image: docker.io/library/node:24
|
|
steps:
|
|
- name: Install Git
|
|
run: apt update && apt install git
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Restore the NPM cache
|
|
id: tsru-npm
|
|
uses: https://data.forgejo.org/actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
./node_modules
|
|
key: node_modules
|
|
|
|
- name: Install dependencies
|
|
run: npm i --include=dev
|
|
|
|
- name: Preserve the NPM packages
|
|
uses: https://data.forgejo.org/actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
./node_modules
|
|
key: ${{ steps.tsru-npm.outputs.cache-primary-key }}
|
|
|
|
- name: Populate the .env file
|
|
run: echo PUBLIC_TS_DISCORD=${{ env.PUBLIC_TS_DISCORD }} >> .env
|
|
|
|
- name: Build frontend
|
|
run: npm run build
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: website
|
|
path: build/ |