2023-08-28 08:06:08 +00:00
|
|
|
name: Build Pull Request Contents
|
|
|
|
|
2023-11-28 10:17:52 +00:00
|
|
|
on:
|
2023-08-28 08:06:08 +00:00
|
|
|
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
|
2023-11-28 11:51:25 +00:00
|
|
|
uses: actions/setup-node@v4
|
2023-08-28 08:06:08 +00:00
|
|
|
with:
|
|
|
|
node-version: 18.x
|
2023-11-28 11:55:40 +00:00
|
|
|
# cache: "yarn"
|
2023-11-28 10:17:52 +00:00
|
|
|
|
2023-11-28 11:51:25 +00:00
|
|
|
- name: Run install
|
|
|
|
uses: borales/actions-yarn@v4
|
|
|
|
with:
|
2023-11-28 12:01:13 +00:00
|
|
|
cmd: corepack enable && install # will run `yarn install` command
|
2023-11-28 11:51:25 +00:00
|
|
|
|
2023-08-28 08:06:08 +00:00
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
|
|
|
uses: tj-actions/changed-files@v38
|
|
|
|
with:
|
|
|
|
files_yaml: |
|
|
|
|
apiserver:
|
|
|
|
- apiserver/**
|
|
|
|
web:
|
2023-09-03 13:20:30 +00:00
|
|
|
- web/**
|
2023-08-28 08:06:08 +00:00
|
|
|
deploy:
|
2023-09-03 13:20:30 +00:00
|
|
|
- space/**
|
2023-08-28 08:06:08 +00:00
|
|
|
|
|
|
|
- name: Build Plane's Main App
|
|
|
|
if: steps.changed-files.outputs.web_any_changed == 'true'
|
|
|
|
run: |
|
|
|
|
yarn
|
2023-10-13 06:35:49 +00:00
|
|
|
yarn build --filter=web
|
2023-08-28 08:06:08 +00:00
|
|
|
|
|
|
|
- name: Build Plane's Deploy App
|
|
|
|
if: steps.changed-files.outputs.deploy_any_changed == 'true'
|
|
|
|
run: |
|
|
|
|
yarn
|
2023-10-13 06:35:49 +00:00
|
|
|
yarn build --filter=space
|