Revert "mirrors/monitor: Change script to output integers" #379
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pip3 install -Ur requirements.txt | |
- name: Build docs | |
run: mkdocs -v build | |
- name: Deploy to GitHub Pages | |
if: "github.repository == 'ustclug/documentations' && github.ref == 'refs/heads/master'" | |
run: | | |
CINFO="$(git log -1 --pretty="[%h] %an: %s")" | |
cd site | |
git init --quiet | |
echo -n "docs.ustclug.org" > CNAME | |
: > .nojekyll | |
git remote add origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git | |
git fetch --depth=1 origin gh-pages | |
git reset --soft FETCH_HEAD | |
git add --all | |
git -c user.name=GitHub -c user.email=noreply@github.com commit \ | |
-m "Auto deploy from GitHub Actions build ${GITHUB_RUN_NUMBER}" \ | |
-m "$CINFO" | |
git push origin +HEAD:gh-pages |