mirror of
https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git
synced 2025-08-23 04:35:28 +08:00
36 lines
925 B
YAML
36 lines
925 B
YAML
name: deploy
|
|
on:
|
|
push:
|
|
branches: ['new-theme']
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: set up python 3.4
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.4
|
|
- name: install dependencies
|
|
shell: bash
|
|
run: |
|
|
pip install PyYAML==5.1.2
|
|
pip install mkdocs==0.16.3
|
|
python setup.py install
|
|
- 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
|
|
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
|
|
|