diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 50d45e1f..cb662141 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -13,6 +13,12 @@ on: tags: - "*" + pull_request: + branches: [main] + paths: + - ".github/workflows/documentation.yml" + - requirements/documentation.txt + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read @@ -54,15 +60,26 @@ jobs: - name: Build static website run: mkdocs build --verbose + - name: Save build doc as artifact + uses: actions/upload-artifact@v3 + with: + name: documentation + path: site/ + if-no-files-found: error + retention-days: 30 + - name: Setup Pages uses: actions/configure-pages@v3 + if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') - name: Upload artifact uses: actions/upload-pages-artifact@v1 + if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') with: # Upload entire repository - path: site + path: site/ - name: Deploy to GitHub Pages id: deployment + if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') uses: actions/deploy-pages@v1 diff --git a/requirements.txt b/requirements.txt index 2d521a05..75766a0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,3 @@ -setuptools -wheel - -r requirements/base.txt -e "." diff --git a/requirements/development.txt b/requirements/development.txt index 41aca24d..d47dace6 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -5,6 +5,6 @@ black feedparser>=6.0,<6.1 flake8>=4,<6.1 -pre-commit>=2.10,<3.1 +pre-commit>=3,<3.2 pytest-cov==4.0.* validator-collection>=1.5,<1.6 diff --git a/requirements/documentation.txt b/requirements/documentation.txt index 6780da46..ccd7cef2 100644 --- a/requirements/documentation.txt +++ b/requirements/documentation.txt @@ -1,6 +1,6 @@ # Documentation # ----------------------- mkdocs-bootswatch>=1,<2 -mkdocs-minify-plugin==0.5.* +mkdocs-minify-plugin==0.6.* pygments>=2.5,<3 pymdown-extensions>=7,<10