Repository navigation
118 lines (105 loc) · 3.73 KB
/
Copy pathci.yml
File metadata and controls
118 lines (105 loc) · 3.73 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: CI
'on':
push:
branches:
- master
- develop
- v5
- v6
workflow_dispatch:
jobs:
build-dita:
name: Build PDF Sample
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v7
- name: Git checkout DITA specialization
uses: actions/checkout@v7
with:
repository: dita-bootstrap/dita-bootstrap.dtd
ref: ${{ github.ref_name }}
path: specialization
- name: Copy Sample folder
run: cp -R specialization/sample sample
- name: Build Bootstrap
uses: dita-ot/dita-ot-action@4.4
with:
install: |
apt-get update -q
export DEBIAN_FRONTEND=noninteractive
apt-get install -qy --no-install-recommends nodejs libfontconfig1
nodejs -v
plugins: |
https://github.com/dita-bootstrap/dita-bootstrap.dtd/archive/develop.zip
https://github.com/dita-bootstrap/dita-bootstrap.pdf/archive/develop.zip
project: .github/dita-ot/pdf.xml
- name: Upload PDF
uses: actions/upload-artifact@v7
if: always()
with:
name: pdf
path: out/pdf
build-html:
name: Build HTML Documentation
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v7
- name: Git checkout DITA specialization
uses: actions/checkout@v7
with:
repository: dita-bootstrap/dita-bootstrap.dtd
ref: ${{ github.ref_name }}
path: specialization
- name: Git checkout HTML
uses: actions/checkout@v7
with:
repository: dita-bootstrap/dita-bootstrap.html
ref: ${{ github.ref_name }}
path: html
- name: Copy code examples
run: HTML_DIR=html SPEC_DIR=specialization ./copy-code.sh
- name: Calculate short SHA
uses: benjlevesque/short-sha@v4.0
id: short-sha
with:
length: 7
- name: Build Bootstrap
uses: dita-ot/dita-ot-action@4.4
with:
install: |
apt-get update -q
export DEBIAN_FRONTEND=noninteractive
apt-get install -qy --no-install-recommends nodejs
nodejs -v
plugins: |
fox.jason.extend.css
https://github.com/dita-bootstrap/dita-bootstrap.dtd/archive/develop.zip
https://github.com/dita-bootstrap/dita-bootstrap.html/archive/develop.zip
https://github.com/dita-bootstrap/dita-bootstrap.lunr/archive/develop.zip
https://github.com/jason-fox/fox.jason.prismjs/archive/master.zip
fox.jason.favicon
fox.jason.open-graph
https://github.com/dita-bootstrap/dita-bootstrap.theme-switcher/archive/develop.zip
project: .github/dita-ot/html.xml
- name: Determine target folder
id: set-target
run: |
if [ "${{ github.ref_name }}" = "master" ] || [ "${{ github.ref_name }}" = "develop" ]; then
echo "target_dir=" >> $GITHUB_OUTPUT
printf 'clean_exclude<<EOF\nv5\nv6\nEOF\n' >> $GITHUB_OUTPUT
else
echo "target_dir=${{ github.ref_name }}" >> $GITHUB_OUTPUT
fi
- name: Deploy HTML 🚀
uses: JamesIves/github-pages-deploy-action@v4.9.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: out/html
target-folder: ${{ steps.set-target.outputs.target_dir }}
commit-message: '🚀 Deploy ${{ steps.short-sha.outputs.sha }} to GitHub Pages'
git-config-name: 'GitHub Action'
git-config-email: 'action@github.com'
clean-exclude: ${{ steps.set-target.outputs.clean_exclude }}