From 9a019ddf565639e51489b894e5e9a239ef194bc3 Mon Sep 17 00:00:00 2001 From: struga Date: Thu, 25 Aug 2022 15:19:03 +0300 Subject: [PATCH] Add documentation (#26) --- .github/workflows/build-docs.yml | 30 +++++++++++++++++++++++++++ .github/workflows/build.yml | 23 --------------------- .github/workflows/deploy-docs.yml | 34 +++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 25 ----------------------- 4 files changed, 64 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/build-docs.yml create mode 100644 .github/workflows/deploy-docs.yml diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..4e97acc --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,30 @@ +name: build +on: + - pull_request + +env: + PYTHON_VERSION: 3.x + +jobs: + documentation: + name: Build documentation + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python runtime + uses: actions/setup-python@v1 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install Python dependencies + run: | + pip install -r requirements.txt + - name: Install theme + run: | + pip install mkdocs-gitbook + - name: Build documentation + run: | + mkdocs build + mkdocs --version diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7016ced..8b1d094 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,26 +8,3 @@ on: jobs: build: uses: valitydev/java-workflow/.github/workflows/maven-library-build.yml@v1 - - documentation: - name: Build documentation - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Python runtime - uses: actions/setup-python@v1 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Install Python dependencies - run: | - pip install -r requirements.txt - - name: Install theme - run: | - pip install mkdocs-gitbook - - name: Build documentation - run: | - mkdocs build - mkdocs --version diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..7dd8666 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,34 @@ +name: deploy +on: + push: + branches: + - master + +env: + PYTHON_VERSION: 3.x + +jobs: + documentation: + name: Build documentation + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python runtime + uses: actions/setup-python@v1 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install Python dependencies + run: | + pip install -r requirements.txt + - name: Install theme + run: | + pip install mkdocs-gitbook + - name: Deploy documentation + env: + GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} + run: | + mkdocs gh-deploy --force + mkdocs --version diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4b040de..58af93b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,28 +15,3 @@ jobs: deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }} - - documentation: - name: Build documentation - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Python runtime - uses: actions/setup-python@v1 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Install Python dependencies - run: | - pip install -r requirements.txt - - name: Install theme - run: | - pip install mkdocs-gitbook - - name: Deploy documentation - env: - GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }} - run: | - mkdocs gh-deploy --force - mkdocs --version