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