-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (39 loc) · 1.05 KB
/
preview.yaml
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
47
48
49
name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Checkout Obsidian Pool Notes
uses: actions/checkout@v4
with:
repository: wodeni/nimo-obsidian-notes-pool
token: ${{ secrets.GH_PAT_OBSIDIAN_POOL }}
path: ./pool-notes/
- name: Log directory structure
run: |
ls -al
ls -al pool-notes/
- name: Install and Build
run: |
yarn
yarn build -- --base /pr-preview/pr-${{ github.event.pull_request.number }}/
- name: Copy index.html to 404.html for routing
run: |
cp dist/index.html dist/404.html
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./dist/