1
0
mirror of https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git synced 2025-08-23 04:35:28 +08:00
Files
LearnOpenGL-CN/.github/workflows/deploy.yml
2023-04-26 03:03:03 +00:00

35 lines
905 B
YAML

name: deploy
on:
push:
branches: ['new-theme']
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up python
uses: actions/setup-python@v2
with:
python-version: 3.7
- 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