From eaf013d3114136c436614e03f03913478c0a346e Mon Sep 17 00:00:00 2001 From: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:47:48 +0100 Subject: [PATCH 1/4] Add dependabot config --- .github/dependabot.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..94b5bb43af --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,31 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "friday" + time: "10:00" + timezone: "Europe/Amsterdam" + open-pull-requests-limit: 5 + reviewers: + - "ruthkoole" + groups: + all-github-actions: + patterns: + - "*" + + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + day: "friday" + time: "10:00" + timezone: "Europe/Amsterdam" + open-pull-requests-limit: 5 + reviewers: + - "ruthkoole" + groups: + all-pip-packages: + patterns: + - "*" From 25b5378d9a262783aaa8d8bb1256e02d314180e5 Mon Sep 17 00:00:00 2001 From: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:33:55 +0100 Subject: [PATCH 2/4] Add .venv to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 08de062431..113e4b95bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # build files -site \ No newline at end of file +site +.venv/ \ No newline at end of file From 17abe272912c990ad9a2c968e537e29c3308f1e0 Mon Sep 17 00:00:00 2001 From: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:36:26 +0100 Subject: [PATCH 3/4] Change workflow deployment for github pages --- .github/workflows/main.yaml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index af85d0bf96..6c087c9847 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,15 +5,17 @@ on: - main jobs: - build: - name: pages-build-deployment + deploy: + name: deploy main runs-on: ubuntu-latest steps: - - name: Checkout main - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Deploy MkDocs - uses: mhausenblas/mkdocs-deploy-gh-pages@1.26 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REQUIREMENTS: requirements.txt \ No newline at end of file + - uses: actions/setup-python@v5 + with: + python-version: 3.x + cache: 'pip' + + - run: pip install -r requirements.txt + + - run: mkdocs gh-deploy --force \ No newline at end of file From 0f548af392f8435dc0a1e9a6afd67d1f7511c966 Mon Sep 17 00:00:00 2001 From: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:38:21 +0100 Subject: [PATCH 4/4] Add preview CD for mkdocs --- .github/workflows/preview.yaml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/preview.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml new file mode 100644 index 0000000000..5e7fb9a50f --- /dev/null +++ b/.github/workflows/preview.yaml @@ -0,0 +1,43 @@ +name: Deploy PR previews + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +concurrency: preview-${{ github.ref }} + +jobs: + deploy: + name: deploy PR + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + if: github.event.action != 'closed' + with: + python-version: 3.x + cache: 'pip' + + - name: install dependencies + if: github.event.action != 'closed' + run: pip install -r requirements.txt + + - name: build preview + if: github.event.action != 'closed' + run: mkdocs build + + - uses: actions/upload-artifact@v4 + if: github.event.action != 'closed' + with: + name: AlgoritmeKaderWebsite-${{github.event.number}} + path: ./site/ + + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./site/ \ No newline at end of file