-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (44 loc) · 1.1 KB
/
publish-docs.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
47
48
49
50
51
52
name: Build and publish docs to GH Pages
on:
push:
branches:
- main
paths:
- 'modules/**'
- 'docs/**'
- '.github/workflows/publish-docs.yml'
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- closed
paths:
- 'modules/**'
- 'docs/**'
- '.github/workflows/publish-docs.yml'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build using docker
if: github.event.action != 'closed'
run: |
docker run -v $(pwd):/app ghcr.io/nf-osi/data-model-docs
- name: Deploy preview for PRs
if: github.event_name == 'pull_request'
id: preview-deployment
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./docs
- name: Deploy 🚀
if: github.event_name != 'pull_request'
id: prod-deployment
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs