From 6e5fe6c8fc12e9fd2bdd7561b8f28fcf448d2e0b Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 29 Oct 2024 17:49:48 +0900 Subject: [PATCH] Add Github action to deploy mkdocs to gh-pages --- .github/workflows/deploy_gh_pages.yml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy_gh_pages.yml diff --git a/.github/workflows/deploy_gh_pages.yml b/.github/workflows/deploy_gh_pages.yml new file mode 100644 index 0000000..39b0ce8 --- /dev/null +++ b/.github/workflows/deploy_gh_pages.yml @@ -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