mirror of
https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git
synced 2025-08-22 12:15:29 +08:00
Python 3.7 has reached it's EOL support: https://devguide.python.org/versions/#status-of-python-versions See also: https://github.com/actions/setup-python/issues/962
35 lines
905 B
YAML
35 lines
905 B
YAML
name: deploy
|
|
on:
|
|
push:
|
|
branches: ['new-theme']
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: set up python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.9
|
|
- name: install dependencies
|
|
shell: bash
|
|
run: |
|
|
pip install mkdocs==1.4.2 python-markdown-math==0.8
|
|
- name: build site
|
|
shell: bash
|
|
run: mkdocs build --clean
|
|
- name: deploy
|
|
shell: bash
|
|
env:
|
|
GH_NAME: ${{ secrets.GH_NAME }}
|
|
GH_EMAIL: ${{ secrets.GH_EMAIL }}
|
|
API_TOKEN: ${{ secrets.API_TOKEN }}
|
|
run: |
|
|
cd site
|
|
touch .nojekyll
|
|
git init
|
|
git add .
|
|
git -c user.name=$GH_NAME -c user.email=$GH_EMAIL commit -m "Auto Deployment"
|
|
git push -f -q "https://learnopengl-bot:$API_TOKEN@github.com/LearnOpenGL-CN/learnopengl-cn.github.io" master
|
|
|