mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-15 00:46:22 +00:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- safe.fiery.me
|
|
paths:
|
|
- 'src/**/*.css'
|
|
- 'src/**/*.js'
|
|
- 'src/**/*.scss'
|
|
- 'src/versions.json'
|
|
|
|
env:
|
|
NODE_VERSION: 16
|
|
|
|
jobs:
|
|
build:
|
|
name: Rebuild client assets and bump v1 version string
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Cache node_modules
|
|
uses: actions/cache@v3
|
|
id: cache-nodemodules
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
|
|
run: yarn install --frozen-lockfile --non-interactive
|
|
|
|
- name: Update browserslist/caniuse-lite
|
|
run: npx browserslist@latest --update-db
|
|
|
|
- name: Install sass-embedded
|
|
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
|
|
run: yarn add --pure-lockfile --non-interactive --dev sass-embedded && git restore package.json
|
|
|
|
- name: yarn build
|
|
run: yarn build
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
with:
|
|
commit_message: 'dist: rebuilt client assets and bumped v1 version string'
|
|
commit_user_name: loli-bot
|
|
commit_user_email: hi@fiery.me
|
|
env:
|
|
CI: true
|