@@ -22,7 +22,7 @@ concurrency:
22
22
cancel-in-progress : false
23
23
24
24
jobs :
25
- checkout :
25
+ deploy :
26
26
runs-on : ubuntu-latest
27
27
steps :
28
28
- name : Checkout
44
44
file : package.json
45
45
field : homepage
46
46
value : ${{ steps.get-repo-values.outputs.url }}
47
-
48
- create_redirects :
49
- runs-on : ubuntu-latest
50
- needs : checkout
51
- steps :
47
+ # create_redirects
52
48
- name : Create Redirects and Links
49
+ id : create_redirects
53
50
run : |
54
51
mkdir -p dist
55
52
echo "<html><head>\
@@ -63,59 +60,40 @@ jobs:
63
60
echo "<html><head>\
64
61
<meta http-equiv='refresh' content='0; URL=docs/quick-links' />\
65
62
</head><body>Redirecting to quick links page</body></html>" > ./dist/quick.html
66
-
67
- install :
68
- runs-on : ubuntu-latest
69
- needs : create_redirects
70
- steps :
71
63
# Install node packages
72
64
- name : Install
65
+ id : install
73
66
run : |
74
67
echo "<html><body><pre>" > ./dist/installation.html
75
68
npm install |& tee -a ./dist/installation.html
76
69
echo "</pre></body></html>" >> ./dist/installation.html
77
70
echo "* [Installation](../installation.html)" >> docs/quick-links.md
78
-
79
- lint :
80
- runs-on : ubuntu-latest
81
- needs : install
82
- if : success()
83
- steps :
71
+ # Run linter
84
72
- name : Run Linter
73
+ id : lint
85
74
run : |
86
75
npm run eslint-output
87
76
echo "* [Linter](../lint.html)" >> docs/quick-links.md
88
-
89
- build :
90
- runs-on : ubuntu-latest
91
- needs : lint
92
- if : success()
93
- steps :
77
+ # Build the project
94
78
- name : Build the project
79
+ id : build
95
80
run : |
96
81
echo "<html><body><pre>" > ./dist/build.html
97
82
npm run build |& tee -a ./dist/build.html
98
83
echo "</pre></body></html>" >> ./dist/build.html
99
84
echo "* [Build](../build.html)" >> docs/quick-links.md
100
-
101
- test :
102
- runs-on : ubuntu-latest
103
- needs : build
104
- if : success()
105
- steps :
85
+ # Run Tests
106
86
- name : Run Tests
87
+ id : test
107
88
run : |
108
89
echo "<html><body><pre>" > ./dist/tests.html
109
90
npm run test -- --coverage |& tee -a ./dist/tests.html
110
91
echo "</pre></body></html>" >> ./dist/tests.html
111
92
echo "* [Tests](../tests.html)" >> docs/quick-links.md
112
-
113
- integrity :
114
- runs-on : ubuntu-latest
115
- needs : create_redirects
116
- if : success()
117
- steps :
93
+ # Verify Integrity
118
94
- name : Verify Integrity
95
+ if : ${{ !cancelled() }}
96
+ id : integrity
119
97
run : |
120
98
echo "<html><body><pre>" > ./dist/integrity.html
121
99
FILES="test/* .eslintrc.js .eslintrc.json .github/workflows/deploy.yml src/**/*.test.ts src/**/*.test.tsx"
@@ -126,61 +104,43 @@ jobs:
126
104
done
127
105
echo "</pre></body></html>" >> ./dist/integrity.html
128
106
echo "* [Integrity](../integrity.html)" >> docs/quick-links.md
129
-
130
- git_inspector :
131
- runs-on : ubuntu-latest
132
- needs : create_redirects
133
- steps :
107
+ # Create GitInspector Report
134
108
- name : Create GitInspector Report
109
+ if : ${{ !cancelled() }}
110
+ id : gitinspector
135
111
run : |
136
112
git clone https://github.com/jpwhite3/gitinspector.git
137
113
python ./gitinspector/gitinspector.py ./ --grading --format=html -f tsx,ts,html,css -x ./gitinspector -x ./node_modules -x ./wbcore > ./dist/git.html
138
114
echo "* [Git Inspector](../git.html)" >> docs/quick-links.md
139
-
140
- generate_docs :
141
- runs-on : ubuntu-latest
142
- needs : [install, lint, build, test, integrity, git_inspector]
143
- if : success() || failure()
144
- steps :
115
+ # Generate HTML from Markdown in Docs/
145
116
- name : Generate HTML from Markdown in Docs/
117
+ if : ${{ !cancelled() }}
118
+ id : markdown-docs
146
119
uses : ldeluigi/markdown-docs@latest
147
120
with :
148
121
src : docs
149
122
dst : dist/docs/
150
123
151
- deploy :
152
- runs-on : ubuntu-latest
153
- needs : generate_docs
154
- steps :
124
+ # - name: Handle Failure
125
+ # run: |
126
+ # echo "<html><body><h1>Build Failure</h1><p>The build failed during one of the steps.</p>" > ./dist/index.html
127
+ # - uses: austenstone/[email protected]
128
+ # id: job-summary
129
+ # with:
130
+ # create-pdf: false
131
+ # - run: |
132
+ # echo "${{ steps.job-summary.outputs.job-summary }}" >> ./dist/index.html
133
+ # echo "</body></html>" >> ./dist/index.html
134
+ # Deploy
155
135
- name : Setup Pages
156
136
uses : actions/configure-pages@v3
137
+ if : ${{ !cancelled() }}
157
138
- name : Upload artifact
158
139
uses : actions/upload-pages-artifact@v2
140
+ if : ${{ !cancelled() }}
159
141
with :
160
142
path : " dist/"
161
143
- name : Deploy to GitHub Pages
162
144
id : deployment
163
145
uses : actions/deploy-pages@v2
164
-
165
- handle_failure :
166
- runs-on : ubuntu-latest
167
- needs : [create_redirects, checkout, generate_docs, deploy]
168
- if : failure()
169
- steps :
170
- - name : Handle Failure
171
- run : |
172
- echo "<html><body><h1>Build Failure</h1><p>The build failed during one of the steps.</p>" > ./dist/index.html
173
- -
uses :
austenstone/[email protected]
174
- id : job-summary
175
- with :
176
- create-pdf : false
177
- - run : |
178
- echo "${{ steps.job-summary.outputs.job-summary }}" >> ./dist/index.html
179
- echo "</body></html>" >> ./dist/index.html
180
- - name : Upload failure artifact
181
- uses : actions/upload-pages-artifact@v2
182
- with :
183
- path : " dist/"
184
- - name : Deploy to GitHub Pages
185
- id : deployment
186
- uses : actions/deploy-pages@v2
146
+ if : ${{ !cancelled() }}
0 commit comments