-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (61 loc) · 1.66 KB
/
deploy.yml
File metadata and controls
72 lines (61 loc) · 1.66 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Deploy To GitHub Pages
on:
push:
branches:
- main
pull_request:
jobs:
deploy-main:
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: deploy-main
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build documentation
run: yarn build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
cname: revisit.dev
keep_files: true
deploy-preview:
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: deploy-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build documentation
run: yarn build
env:
DOCUSAURUS_BASE_URL: /pr-preview/pr-${{ github.event.pull_request.number }}/
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./build
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto