From 5963ba4f9c0625ecef2e8e6cf96ea011b2d5d4d9 Mon Sep 17 00:00:00 2001 From: mlluciano Date: Wed, 10 Apr 2024 12:52:39 -0400 Subject: [PATCH] add gh actions workflow to build mkdocs --- .github/workflows/deploy-mkdocs.yml | 34 +++++++++++++++++++++++++++++ mkdocs/mkdocs.yml | 1 - 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-mkdocs.yml diff --git a/.github/workflows/deploy-mkdocs.yml b/.github/workflows/deploy-mkdocs.yml new file mode 100644 index 0000000..6146def --- /dev/null +++ b/.github/workflows/deploy-mkdocs.yml @@ -0,0 +1,34 @@ +name: Deploy MkDocs Site from Search Branch + +on: + push: + branches: + - search # This sets it to trigger on changes to the 'search' branch + +jobs: + build-and-deploy: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install mkdocs mkdocs-material + + - name: Build the MkDocs site + run: mkdocs build --verbose + working-directory: mkdocs + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./mkdocs/site + publish_branch: gh-pages # This pushes the build to the 'gh-pages' branch diff --git a/mkdocs/mkdocs.yml b/mkdocs/mkdocs.yml index 55c3057..990dda3 100644 --- a/mkdocs/mkdocs.yml +++ b/mkdocs/mkdocs.yml @@ -1,7 +1,6 @@ site_name: Official Documentation site_author: Manuel Luciano site_description: iDigBio User Documentation -site_dir: ../docs theme: features: - navigation.tabs