chore: change style #188
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: auto-generate-docsify-sidebar | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
master-to-gh-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout master | |
uses: actions/checkout@v2 | |
with: | |
ref: master | |
- name: setup python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: push _sidebar.md to branch gh-pages | |
env: | |
TOKEN: ${{ secrets.TOKEN }} | |
REF: github.com/${{github.repository}} | |
MYEMAIL: [email protected] | |
MYNAME: ${{github.repository_owner}} | |
run: | | |
cp -r docs docs_copy | |
python ./docs_copy/docsify.py | |
cd docs_copy | |
git config --global user.email "${MYEMAIL}" | |
git config --global user.name "${MYNAME}" | |
git init | |
git remote add origin https://${REF} | |
git add . | |
git commit -m "Updated By Github Actions With Build ${{github.run_number}} of ${{github.workflow}} For Github Pages" | |
git push --force --quiet "https://${TOKEN}@${REF}" master:gh-pages | |
cd .. | |
rm -rf docs_copy |