diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..90d48e8ff --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + + - package-ecosystem: "pip" + directory: "docs/" + schedule: + interval: "monthly" diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 270ab06e3..6d9690ca8 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -1,11 +1,26 @@ name: doc on: + pull_request: + branches: + - master + paths: + - 'docs/**' + - '.github/workflows/doc.yml' push: branches: - master paths: - 'docs/**' - '.github/workflows/doc.yml' + workflow_dispatch: # useful for testing tx pushes + workflow_call: + +permissions: + contents: write + +defaults: + run: + working-directory: docs jobs: deploy: @@ -25,7 +40,7 @@ jobs: python-version: '3.10' - name: Install Python requirements - run: pip install -r ./docs/.utils/requirements.txt + run: pip install -r requirements.txt - name: Install Transifex client run: | @@ -33,23 +48,34 @@ jobs: tar -xvzf tx-linux-amd64.tar.gz - name: Configure Transifex - run: | - python ./docs/.utils/transifex_utils.py + run: scripts/transifex_utils.py env: TX_TOKEN: ${{ secrets.TX_TOKEN }} - name: Push source files to Transifex - run: | - ./tx push + if: ${{ github.event_name == 'push' }} + run: ./tx push env: TX_TOKEN: ${{ secrets.TX_TOKEN }} - name: Pull translations from Transifex + if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'opengisch/QgisModelBaker' }} run: | ./tx pull --translations --all --minimum-perc 10 ./tx status env: TX_TOKEN: ${{ secrets.TX_TOKEN }} - - name: Build docs + - name: Build documentation + run: mkdocs build + + - uses: actions/upload-artifact@v4 + if: ${{ github.event_name == 'pull_request' }} + with: + name: docs + path: docs/site + if-no-files-found: error + + - name: Deploy to GitHub Pages + if: ${{ github.event_name == 'push' }} run: mkdocs gh-deploy --force diff --git a/docs/.utils/requirements.txt b/docs/.utils/requirements.txt deleted file mode 100644 index 20b192f5d..000000000 --- a/docs/.utils/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -mkdocs-material==8.5.4 -mkdocs-static-i18n==0.31 -PyGithub==1.55 -python-dotenv==0.19.2 -python-slugify diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 000000000..1dc992d61 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +mkdocs-material==9.5.9 +mkdocs-static-i18n==1.2.0 +python-slugify diff --git a/docs/.utils/transifex_utils.py b/docs/scripts/transifex_utils.py old mode 100644 new mode 100755 similarity index 100% rename from docs/.utils/transifex_utils.py rename to docs/scripts/transifex_utils.py diff --git a/mkdocs.yml b/mkdocs.yml index 1964ef277..5a1adc82d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ # Project information -site_name: QGIS Model Baker Documenation +site_name: QGIS Model Baker Documentation site_description: >- This site contains documentation about QGIS Model Baker site_url: https://opengisch.github.io/QgisModelBaker/ @@ -67,23 +67,28 @@ plugins: - i18n: default_language: en languages: - en: English - de: Deutsch - nav_translations: - de: - User Guide: Benutzerhandbuch - Get Started: Loslegen - Model and Data Import Workflow: Modell und Daten Import Workflow - Export Data Workflow: Daten Export Workflow - Validate Data: Daten Validierung - Plugin Configuration: Plugin Konfiguration - Repositories: Repositories - Basket and Dataset Handling: Dataset und Basket Handling - OID Generator: OID Generator - Optimized Projects for Extended Models : Optimierte Projekte für erweiterte Modelle - Model Baker Integration: Model Baker Integration - Technical Concept: Technisches Konzept - Catalogues and their special cases: Kataloge und ihre Spezialfälle - Meta Attributes: Metaattribute - Migrate from ili2db 3 to 4: Migration von ili2db 3 zu 4 - Development: Enwicklung + - locale: en + default: true + name: English + site_name: QGIS Model Baker Documentation + + - locale: de + name: Deutsch + site_name: QGIS Model Baker Dokumentation + nav_translations: + User Guide: Benutzerhandbuch + Get Started: Loslegen + Model and Data Import Workflow: Modell und Daten Import Workflow + Export Data Workflow: Daten Export Workflow + Validate Data: Daten Validierung + Plugin Configuration: Plugin Konfiguration + Repositories: Repositories + Basket and Dataset Handling: Dataset und Basket Handling + OID Generator: OID Generator + Optimized Projects for Extended Models : Optimierte Projekte für erweiterte Modelle + Model Baker Integration: Model Baker Integration + Technical Concept: Technisches Konzept + Catalogues and their special cases: Kataloge und ihre Spezialfälle + Meta Attributes: Metaattribute + Migrate from ili2db 3 to 4: Migration von ili2db 3 zu 4 + Development: Enwicklung