forked from github/plane
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: Build Pull Request Contents
|
|
|
|
on:
|
|
pull_request:
|
|
types: ["opened", "synchronize"]
|
|
|
|
jobs:
|
|
build-pull-request-contents:
|
|
name: Build Pull Request Contents
|
|
runs-on: ubuntu-20.04
|
|
permissions:
|
|
pull-requests: read
|
|
|
|
steps:
|
|
- name: Checkout Repository to Actions
|
|
uses: actions/checkout@v3.3.0
|
|
|
|
- name: Setup Node.js 18.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18.x
|
|
# cache: "yarn"
|
|
|
|
- name: Run install
|
|
uses: borales/actions-yarn@v4
|
|
with:
|
|
cmd: |
|
|
npm i -g yarn@3.6.4
|
|
install # will run `yarn install` command
|
|
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v38
|
|
with:
|
|
files_yaml: |
|
|
apiserver:
|
|
- apiserver/**
|
|
web:
|
|
- web/**
|
|
deploy:
|
|
- space/**
|
|
|
|
- name: Build Plane's Main App
|
|
if: steps.changed-files.outputs.web_any_changed == 'true'
|
|
run: |
|
|
yarn
|
|
yarn build --filter=web
|
|
|
|
- name: Build Plane's Deploy App
|
|
if: steps.changed-files.outputs.deploy_any_changed == 'true'
|
|
run: |
|
|
yarn
|
|
yarn build --filter=space
|