File tree Expand file tree Collapse file tree 2 files changed +67
-4
lines changed Expand file tree Collapse file tree 2 files changed +67
-4
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,7 @@ name: build
33on :
44 push :
55 branches :
6- - " *"
7- pull_request :
8- branches :
9- - " *"
6+ - " master"
107
118permissions :
129 contents : write
Original file line number Diff line number Diff line change 1+ name : build
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches-ignore :
7+ - " master"
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+ - uses : actions/setup-python@v5
17+ with :
18+ python-version : " 3.11"
19+
20+ - name : Install dependencies
21+ run : |
22+ pip3 install \
23+ -r requirements.txt \
24+ -r requirements-ci.txt
25+
26+ - name : " Linting: autocorrect"
27+ continue-on-error : true
28+ run : |
29+ curl -fsSL https://raw.githubusercontent.com/huacnlee/autocorrect/main/install | sh
30+ autocorrect --fix
31+
32+ - name : " Linting: markdownlint-cli2 Part 1"
33+ uses : DavidAnson/markdownlint-cli2-action@v15
34+ continue-on-error : true
35+ with :
36+ fix : true
37+ globs : |
38+ docs/**/*.md
39+ README.md
40+
41+ - name : " Linting: markdownlint-cli2 Part 2"
42+ uses : DavidAnson/markdownlint-cli2-action@v15
43+ continue-on-error : true
44+ with :
45+ fix : true
46+ globs : |
47+ docs/**/*.md
48+ README.md
49+ - name : Stop and report errors
50+ run : |
51+ git add -A
52+ if ! git diff-index --quiet --cached HEAD --; then
53+ echo "Stop."
54+ exit 1
55+ fi
56+
57+ - name : Build docs
58+ run : |
59+ mkdocs -v build
60+ : > site/.nojekyll
61+ echo -n '201.ustclug.org' > site/CNAME
62+ - name : Upload artifact
63+ if : github.ref == 'refs/heads/master'
64+ uses : actions/upload-pages-artifact@v3
65+ with :
66+ path : site
You can’t perform that action at this time.
0 commit comments