-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) ยท 1.08 KB
/
preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: pr-preview
on:
# main, develop ๋ธ๋์น๋ฅผ ํฅํด PR ์ฌ๋ฆฌ๋ฉด ์์ ๋ฐฐํฌ๋๋๋ก ์ค์
pull_request:
types:
- opened
- reopened
- synchronize
branches: [main, develop]
# ๊ถํ ์ค์
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
pages: write
deployments: write
# ๋์์ฑ ์ค์
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
# workflow์ ์ํ ๋ ํฌ์งํ ๋ฆฌ์ ์ ๊ทผํ ์ ์๋๋ก ์ค์
- name: Checkout
uses: actions/checkout@v4
- run: echo "PREVIEW_PATH=pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
# ์ข
์์ฑ ์ค์น ๋ฐ ํ๋ก์ ํธ ๋น๋
- name: Install and Build
run: yarn install && yarn build
# PR ํ๋ฆฌ๋ทฐ ๋ฐฐํฌ
- name: Deploy PR Preview
uses: rossjrw/[email protected]
with:
token: ${{ secrets.AUTH_TOKEN}}
source-dir: ./dist/
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto