Skip to content

doc deployment #2

doc deployment

doc deployment #2

name: Deploy MkDocs site
on:
push:
branches:
- main # 当推送到主分支时触发
- vyokky/dev # 当推送到 vyokky_dev 分支时触发
paths:
- 'documents/**' # 当 docs 目录中的文件变化时触发
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install MkDocs and dependencies
run: |
pip install mkdocs mkdocs-material
- name: Deploy to GitHub Pages
run:
cd documents

Check failure on line 30 in .github/workflows/document_deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/document_deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 30
if [ -f "../mkdocs.yml" ]; then
cd ..
mkdocs gh-deploy --force
else
echo "Config file 'mkdocs.yml' does not exist."
exit 1
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}