From b368b07df8a8bc9fe81607b3e36f316dd1bf10af Mon Sep 17 00:00:00 2001 From: Diego Viero Date: Thu, 29 Jan 2026 15:45:17 +0100 Subject: [PATCH 1/3] Give up on automatic restoring _config.yml --- .github/workflows/keep-config-intact.yml | 41 ------------------------ _config.yml | 2 +- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 .github/workflows/keep-config-intact.yml diff --git a/.github/workflows/keep-config-intact.yml b/.github/workflows/keep-config-intact.yml deleted file mode 100644 index f8df384..0000000 --- a/.github/workflows/keep-config-intact.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Protect branch-specific files -on: - pull_request: - branches: - - main - - test - types: [opened, synchronize, reopened] -permissions: - contents: write - pull-requests: write -jobs: - restore-config: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - - name: Restore target branch's _config.yml - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - # Get the target branch (main or test) - TARGET_BRANCH="${{ github.base_ref }}" - - # Get target branch's version of _config.yml - git fetch origin "$TARGET_BRANCH" - git show "origin/$TARGET_BRANCH:_config.yml" > /tmp/target_config.yml - - # Compare with current version - if ! cmp -s _config.yml /tmp/target_config.yml; then - echo "Restoring $TARGET_BRANCH's _config.yml to PR branch" - cp /tmp/target_config.yml _config.yml - git add _config.yml - git commit -m "chore: restore $TARGET_BRANCH's _config.yml [automated]" - git push - else - echo "✓ _config.yml already matches $TARGET_BRANCH's version" - fi \ No newline at end of file diff --git a/_config.yml b/_config.yml index 9098fdb..3304a6b 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,6 @@ theme: just-the-docs -baseurl: /Digital-Interfaces/test # For test branch: /repository-name/test +baseurl: /Digital-Interfaces # For test branch: /repository-name/test #theme: just-the-docs title: Digital Interfaces From a93890be8a4e8b710083a6a74dfd8c7859943735 Mon Sep 17 00:00:00 2001 From: Diego Viero Date: Thu, 29 Jan 2026 15:46:32 +0100 Subject: [PATCH 2/3] Fix _config.yml on test branch --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 3304a6b..9098fdb 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,6 @@ theme: just-the-docs -baseurl: /Digital-Interfaces # For test branch: /repository-name/test +baseurl: /Digital-Interfaces/test # For test branch: /repository-name/test #theme: just-the-docs title: Digital Interfaces From ef616640a23807726f65c5604e98b71c0c900903 Mon Sep 17 00:00:00 2001 From: Diego Viero Date: Thu, 29 Jan 2026 15:48:30 +0100 Subject: [PATCH 3/3] Add documentation on config merge --- _config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_config.yml b/_config.yml index 9098fdb..2a3758a 100644 --- a/_config.yml +++ b/_config.yml @@ -1,5 +1,7 @@ theme: just-the-docs +# If issues with merging of this file occur in the future, please run the following command in a terminal: +# git config merge.ours.driver true baseurl: /Digital-Interfaces/test # For test branch: /repository-name/test #theme: just-the-docs