-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github action to deploy mkdocs to gh-pages
- Loading branch information
1 parent
551b50b
commit 6e5fe6c
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 '[email protected]' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
mkdocs gh-deploy |