This repository was archived by the owner on Nov 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
59 lines (50 loc) · 1.5 KB
/
pr_demo.yml
File metadata and controls
59 lines (50 loc) · 1.5 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
name: Deploy PR docs to Pages
on:
pull_request_target
jobs:
build:
name: Build and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout PR
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v1
- name: Install and Build
run: |
yarn install
yarn build
- name: Lint
run: yarn lint
docs:
name: Build docs
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v2
name: Checkout PR
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v1
- name: Install and Build
run: |
yarn install
SAPPER_APP_BASEPATH=attractions/${{ github.event.number }} yarn export --basepath attractions/${{ github.event.number }}
- name: Deploy demo to GitHub Pages
uses: peaceiris/actions-gh-pages@v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/__sapper__/export/attractions/${{ github.event.number }}
destination_dir: ${{ github.event.number }}
keep_files: true
- name: Post docs URL on PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Docs available on https://illright.github.io/attractions/${{ github.event.pull_request.number }}/"