This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (72 loc) · 2.27 KB
/
jsonschemadocs.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: jsonschema2md
on:
push:
branches:
- master
jobs:
jsonschemadocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: jsonschema2md install
run: |
npm install -g @adobe/jsonschema2md
jsonschema2md -d schemas/ -o docs/
- name: Upload jsonschema docs
uses: actions/upload-artifact@v2
with:
name: schemadocs
path: docs/
- name: Upload schema files
uses: actions/upload-artifact@v2
with:
name: schemafiles
path: schemas/
DeployPages:
needs: jsonschemadocs
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
- name: Install SSH Client 🔑
uses: webfactory/ssh-agent@v0.2.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Download schemafiles
uses: actions/download-artifact@v2
with:
name: schemafiles
path: downloads/schemas
- name: Download jsonschema docs
uses: actions/download-artifact@v2
with:
name: schemadocs
path: downloads/docs
- name: Display content of downloaded directory
run: |
ls -l downloads/schemas
ls -R downloads/docs
- name: Deploy Schema Docs 🚀
uses: JamesIves/github-pages-deploy-action@3.5.9
with:
SSH: true
BASE_BRANCH: master
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: downloads/docs # The folder the action should deploy.
TARGET_FOLDER: schemadocs
CLEAN: true
- name: Deploy Schemas 🚀
uses: JamesIves/github-pages-deploy-action@3.5.9
with:
SSH: true
BASE_BRANCH: master
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: downloads/schemas # The folder the action should deploy.
TARGET_FOLDER: schemas
CLEAN: true