From 9047b058fd237356f5b88f8daf91dea33951ca64 Mon Sep 17 00:00:00 2001 From: "Md. Almas Ali" Date: Sat, 1 Jun 2024 01:24:48 +0600 Subject: [PATCH] refactor: trying to fix the CI. --- .github/workflows/tests.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8f28f92..165bd47 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -25,7 +25,8 @@ jobs: - name: Check for changes in docs/ or mkdocs.yml id: check_changes run: | - git diff --name-only origin/master -- > changed_files.txt + git fetch origin + git diff --name-only origin/main -- > changed_files.txt if grep -qE '(^docs/|^mkdocs.yml)' changed_files.txt; then echo "changes_detected=true" >> $GITHUB_ENV else @@ -50,9 +51,15 @@ jobs: if: env.changes_detected == 'true' run: mkdocs build - - name: Install Ruby and Bundler + - name: Install Ruby if: env.changes_detected == 'true' - run: sudo apt-get install -y ruby-full + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' + + - name: Install Bundler + if: env.changes_detected == 'true' + run: gem install bundler - name: Install HTML Proofer if: env.changes_detected == 'true'