Skip to content

构建 CI/CD 实现自动化静态网站部署 #1

构建 CI/CD 实现自动化静态网站部署

构建 CI/CD 实现自动化静态网站部署 #1

Workflow file for this run

name: Deploy MkDocs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@main
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
- name: Update dir
run: python ./update_dir.py
- name: Deploy docs to GitHub Pages
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}