Skip to content

Merge pull request #9945 from TencentBlueKing/changelog/v2.1.0-rc.1 #53

Merge pull request #9945 from TencentBlueKing/changelog/v2.1.0-rc.1

Merge pull request #9945 from TencentBlueKing/changelog/v2.1.0-rc.1 #53

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Frontend CI
on:
push:
branches: [master]
paths:
- "src/frontend/**"
pull_request:
branches: [master, release-*]
paths:
- "src/frontend/**"
workflow_dispatch:
workflow_call:
inputs:
upload:
required: true
type: string
jobs:
frontend:
name: Build frontend
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/cache@v3
id: yarn-cache
with:
path: src/frontend/**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('src/frontend/**/package.json') }}
- name: prefer offline
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --prefer-offline && yarn install
working-directory: src/frontend
- run: yarn public
working-directory: src/frontend
- uses: actions/upload-artifact@v3
if: ${{ inputs.upload == 'true' }}
with:
name: frontend
path: src/frontend/frontend/