Skip to content

Build

Build #1094

Workflow file for this run

name: Build
on:
push:
branches:
- master
schedule:
- cron: '0 12 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18.x
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm i
- run: pnpm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GIT_TOKEN }}
user_name: ${{ secrets.GIT_USER }}
user_email: ${{ secrets.GIT_EMAIL }}
publish_branch: gh-pages
publish_dir: public
cname: ruleset.skk.moe