diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..baffee39b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,44 @@ +name: Release Docs + +on: + push: + branches: + - tags + paths: + - docs/** + - + +jobs: + release_docs: + name: Release Docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Install dependencies + run: python3 -m pip install -r ./docs/scripts/requirements.txt + + - name: Build site + run: | + ./docs/scripts/copy_docs.sh + mkdocs build + + - name: Push site + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + destination_dir: ${{ env.GITHUB_REF_NAME }} + publish_dir: ./site + + - name: Push redirect + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/redirect + keep_files: true] diff --git a/docs/scripts/copy_docs.sh b/docs/scripts/copy_docs.sh new file mode 100755 index 000000000..077f5db39 --- /dev/null +++ b/docs/scripts/copy_docs.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -eo pipefail + +cp CONTRIBUTING.md code-of-conduct.md ./docs/ + +cp LICENSE ./docs/LICENSE.md diff --git a/docs/scripts/index.html.gotmpl b/docs/scripts/index.html.gotmpl new file mode 100644 index 000000000..26b836eba --- /dev/null +++ b/docs/scripts/index.html.gotmpl @@ -0,0 +1,3 @@ +
+ + \ No newline at end of file diff --git a/docs/scripts/requirements.txt b/docs/scripts/requirements.txt new file mode 100644 index 000000000..0f4c40565 --- /dev/null +++ b/docs/scripts/requirements.txt @@ -0,0 +1,3 @@ +mkdocs-git-revision-date-localized-plugin == 1.0.0 +mkdocs == 1.2.3 +mkdocs-material == 8.2.5 \ No newline at end of file