2022-12-14 14:17:10 +09:00
|
|
|
name: Build pull request
|
2021-11-14 16:24:17 +09:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: ['opened', 'synchronize']
|
|
|
|
|
|
|
|
jobs:
|
2022-03-15 20:34:14 +09:00
|
|
|
build-pull-request:
|
2022-12-14 14:17:10 +09:00
|
|
|
name: Build pull request
|
2022-03-15 20:34:14 +09:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
PR_NUMBER: ${{github.event.number}}
|
|
|
|
steps:
|
2022-03-23 23:10:39 +09:00
|
|
|
- name: Checkout repository
|
2024-10-03 16:00:32 +09:00
|
|
|
uses: actions/checkout@v4.2.0
|
2022-06-14 23:25:48 +09:00
|
|
|
- name: Setup node
|
2024-10-03 16:03:33 +09:00
|
|
|
uses: actions/setup-node@v4.0.4
|
2022-06-14 23:25:48 +09:00
|
|
|
with:
|
2024-04-24 23:31:01 +09:00
|
|
|
node-version: 20.12.2
|
|
|
|
cache: 'npm'
|
2022-09-07 17:16:44 +09:00
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
2022-03-15 20:34:14 +09:00
|
|
|
- name: Build app
|
2023-03-29 12:17:00 +09:00
|
|
|
env:
|
2024-04-24 23:31:01 +09:00
|
|
|
NODE_OPTIONS: '--max_old_space_size=4096'
|
2022-09-07 17:16:44 +09:00
|
|
|
run: npm run build
|
2022-03-15 20:34:14 +09:00
|
|
|
- name: Upload artifact
|
2024-08-14 22:38:35 +09:00
|
|
|
uses: actions/upload-artifact@v4.3.6
|
2022-03-15 20:34:14 +09:00
|
|
|
with:
|
2022-09-07 17:16:44 +09:00
|
|
|
name: preview
|
2022-03-15 20:34:14 +09:00
|
|
|
path: dist
|
|
|
|
retention-days: 1
|
2022-09-07 17:16:44 +09:00
|
|
|
- name: Save pr number
|
|
|
|
run: echo ${PR_NUMBER} > ./pr.txt
|
|
|
|
- name: Upload pr number
|
2024-08-14 22:38:35 +09:00
|
|
|
uses: actions/upload-artifact@v4.3.6
|
2022-03-15 20:34:14 +09:00
|
|
|
with:
|
2022-09-07 17:16:44 +09:00
|
|
|
name: pr
|
|
|
|
path: ./pr.txt
|
2022-11-08 23:51:51 +09:00
|
|
|
retention-days: 1
|