-
Notifications
You must be signed in to change notification settings - Fork 492
180 lines (151 loc) · 4.6 KB
/
tlroadmap_checkbrokenlinks_weekly.yaml
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: Check broken links on Saturday
on:
schedule:
- cron: '00 5 * * SAT'
workflow_dispatch:
jobs:
check-links:
name: Check broken links
runs-on: ubuntu-latest
needs:
- combine-site
steps:
- uses: actions/download-artifact@v1
with:
name: vuepress-site
- name: Check links
uses: chabad360/htmlproofer@master
with:
directory: vuepress-site
arguments: >-
--assume-extension
--typhoeus-config '{"timeout": 60}'
--ignore-urls "/www\.consultant\.ru/.*/,/github.com\/.*\/edit\/.*/"
combine-site:
name: Combine artifacts and site
runs-on: ubuntu-latest
needs:
- generate-roadmap-freemind-plantuml
- generate-roadmap-image
- build-vuepress
steps:
- uses: actions/download-artifact@v1
with:
name: vuepress-pre-site
- uses: actions/download-artifact@v1
with:
name: trees
- uses: actions/download-artifact@v1
with:
name: plantuml
- uses: actions/download-artifact@v1
with:
name: freemind
- uses: actions/download-artifact@v1
with:
name: images
- run: |
mv -v plantuml/* vuepress-pre-site
mv -v freemind/* vuepress-pre-site
mv -v images/* vuepress-pre-site
mv -v trees/* vuepress-pre-site
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: vuepress-site
path: vuepress-pre-site
build-vuepress:
name: Build VuePress site and generate roadmap tree
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install js dependencies
run: yarn install --frozen-lockfile
- name: Build vuepress site
run: yarn run site:build
- name: Upload pre-site to artifact
uses: actions/upload-artifact@v1
with:
name: vuepress-pre-site
path: tlroadmap/.vuepress/dist
- name: Upload trees
uses: actions/upload-artifact@v1
with:
name: trees
path: tlroadmap/.vuepress/trees
generate-roadmap-freemind-plantuml:
name: Generate .mm and .puml
runs-on: ubuntu-latest
needs:
- build-vuepress
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
with:
name: trees
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tools/requirements.txt
- name: Run plantuml2freemind
run: |
mkdir freemind
mkdir plantuml
plantuml2freemind convert trees/tree-ru.json freemind/roadmap-ru.mm --no-interaction
plantuml2freemind convert trees/tree-ru.json plantuml/roadmap-ru.puml --no-interaction
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: freemind
path: freemind
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: plantuml
path: plantuml
generate-roadmap-image:
name: Generate .svg and .png
runs-on: ubuntu-latest
needs:
- generate-roadmap-freemind-plantuml
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
with:
name: plantuml
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Generate .png and .svg
run: |
mkdir images
cat plantuml/roadmap-ru.puml | java -jar tools/plantuml.jar -charset UTF-8 -pipe > images/roadmap-ru.png
cat plantuml/roadmap-ru.puml | java -jar tools/plantuml.jar -charset UTF-8 -tsvg -pipe > images/roadmap-ru.svg
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: images
path: images