From cb55ee98db91a84d74d1e90363acd0f154d49afe Mon Sep 17 00:00:00 2001 From: HYP3R00T Date: Thu, 9 May 2024 21:08:28 +0530 Subject: [PATCH] mkdocs publish automation --- .github/workflows/mkdocs_publish.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/mkdocs_publish.yml diff --git a/.github/workflows/mkdocs_publish.yml b/.github/workflows/mkdocs_publish.yml new file mode 100644 index 0000000..927e441 --- /dev/null +++ b/.github/workflows/mkdocs_publish.yml @@ -0,0 +1,34 @@ +name: MkDocs Publish + +on: + push: + branches: + - main # Change this to your main branch name + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install Poetry + run: | + curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - + source $HOME/.poetry/env + + - name: Install dependencies + run: | + poetry install --no-root + + - name: Build and deploy + run: | + poetry run mkdocs build --verbose + poetry run mkdocs gh-deploy --verbose + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}