From ba905ff6fc52c17ac9816870e3e09814e8f7e1d7 Mon Sep 17 00:00:00 2001 From: "Andriy Kushnir (Orhideous)" Date: Mon, 27 Mar 2023 21:37:25 +0300 Subject: [PATCH] Add GHA CI to build and deploy docs --- .github/workflows/docs.yml | 45 ++++++++++++++++++++++++++++++++++++++ .gitignore | 4 ++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..8b0d6e2e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,45 @@ +name: Build documentation +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install python + uses: actions/setup-python@v4 + with: + python-version: 3.x + - name: Setup cache + uses: actions/cache@v2 + with: + key: ${{ github.ref }} + path: .cache + - name: Setup dependencies + run: pip install mkdocs-material pillow cairosvg mkdocs-minify-plugin + - name: Build docs + run: mkdocs build + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./site + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/.gitignore b/.gitignore index 8256f860..3698e60d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ result .direnv/ integration_test/etc/config.dump.yaml + +# MkDocs +.cache +/site