Add Github action to deploy mkdocs to gh-pages
Some checks failed
deploy_gh_pages_mkdocs / deploy (push) Has been cancelled
Some checks failed
deploy_gh_pages_mkdocs / deploy (push) Has been cancelled
This commit is contained in:
parent
551b50b680
commit
6e5fe6c8fc
1 changed files with 28 additions and 0 deletions
28
.github/workflows/deploy_gh_pages.yml
vendored
Normal file
28
.github/workflows/deploy_gh_pages.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
name: deploy_gh_pages_mkdocs
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- mkdocs
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get Python and Git
|
||||||
|
run: |
|
||||||
|
sudo apt-get update && sudo apt-get install python3 git
|
||||||
|
- name: Get mkdocs
|
||||||
|
run: |
|
||||||
|
sudo pip install mkdocs
|
||||||
|
- name: Clone and Checkout repository
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 --no-single-branch https://github.com/Stephen-Seo/TurnBasedMinecraftMod.git TBMM
|
||||||
|
cd TBMM && git checkout mkdocs
|
||||||
|
- name: Publish with mkdocs
|
||||||
|
run: |
|
||||||
|
cd TBMM/tbmm-docs
|
||||||
|
git config --global user.name 'Stephen Seo'
|
||||||
|
git config --global user.email 'seo.disparate@gmail.com'
|
||||||
|
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||||
|
mkdocs gh-deploy
|
Loading…
Reference in a new issue