generated from oxygenxml-incubator/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 2.72 KB
/
dita-build-deploy-netlify-profiling.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
name: Build project documentation and publish to Netlify with profiling conditions
on:
push:
branches:
- development
jobs:
build-dita-and-deploy-netlify-profiling:
name: Build DITA WebHelp Responsive and deploy to Netlify with profiling conditions
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Extract license from secrets
run: |
echo "$OPE_LICENSE" > licensekey.txt
env:
OPE_LICENSE: ${{ secrets.OPE_LICENSE }}
- name: Put license into engine directory
run: |
sudo cp licensekey.txt oxygen-publishing-engine-3.x/licensekey.txt
- name: Write Algolia credentials to config
run: |
echo -e "{\n\t\"appId\": \"40V95VH5YU\",\n\t\"searchOnlyKey\": \"8e4e1e3ae2fc1931b0a5f5d3c8f7544d\",\n\t\"indexName\": \"profiling-example\"\n}" > templates/webhelp-documentation-template-react/src/react/algolia-config.json
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: "./templates/webhelp-documentation-template-react/src/react/package-lock.json"
- run: |
cd templates/webhelp-documentation-template-react/src/react
npm install
npm run build
- name: Build WebHelp Responsive
run: |
cd oxygen-publishing-engine-3.x/bin
sudo chmod +x dita
sudo ./dita --input=../../doc/mobile-phone/mobilePhone.ditamap --format=webhelp-responsive -Dwebhelp.publishing.template=../../templates/webhelp-documentation-template-react --output=../../doc/mobile-phone/out --filter=../../doc/mobile-phone/ditaval/profiling.ditaval
- name: Deploy to Netlify
run: npx netlify-cli deploy --dir=doc/mobile-phone/out --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: c22502b3-0d05-43ec-b964-63e22ff40ea8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Setup Algolia
run: |
echo -e "algolia.appId=$ALGOLIA_APP_ID\nalgolia.adminApiKey=$ALGOLIA_ADMIN_API" > config.properties
mvn -q clean compile exec:java -Dexec.args="-indexName=profiling-example -baseUrl=https://syncro-phone.netlify.app/ -url=https://syncro-phone.netlify.app/ -profilingConditionsPath=doc/mobile-phone/out/subject-scheme-values.json -isFile=false"
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_ADMIN_API: ${{ secrets.ALGOLIA_ADMIN_API }}