forked from aaif-goose/goose
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.32 KB
/
pr-website-preview.yml
File metadata and controls
47 lines (41 loc) · 1.32 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
name: Documentation Site Preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
paths:
- 'documentation/**'
push:
branches-ignore:
- 'dependabot/**'
concurrency: preview-${{ github.ref }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout the branch
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3
- name: Setup Node.js
if: github.event.action != 'closed'
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # pin@v3
with:
node-version: 20
- name: Install dependencies and build docs
working-directory: ./documentation
if: github.event.action != 'closed'
env:
INKEEP_API_KEY: ${{ secrets.INKEEP_API_KEY }}
INKEEP_INTEGRATION_ID: ${{ secrets.INKEEP_INTEGRATION_ID }}
INKEEP_ORG_ID: ${{ secrets.INKEEP_ORG_ID }}
TARGET_PATH: "/goose/pr-preview/pr-${{ github.event.number }}/"
run: |
npm install
npm run build
- name: Deploy preview
uses: rossjrw/pr-preview-action@df22037db54ab6ee34d3c1e2b8810ac040a530c6 # pin@v1
if: ${{ github.event.pull_request.head.repo.full_name == 'block/goose' }}
with:
source-dir: documentation/build