From 10619d6e88fa7b36cb370cbcaca1b047ee35fb38 Mon Sep 17 00:00:00 2001 From: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:19:05 -0500 Subject: [PATCH 1/2] fix checkout command for docs building action Seems like after using the default git checkout github actions step, we can't use other git commands because of some nonsense with the ssh key. Rather than deal with figuring that out, I have just moved all of the weirdness we were doing in the git command to the original checkout command. I have also removed the `rm -rf build/html` command. That directory does not exist before the clone (I think this was carried over from a previous script, because it doesn't actually break anything). --- .github/workflows/docs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d9a60ec946..3139afe15e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,6 +16,9 @@ jobs: shell: bash -l {0} steps: - uses: actions/checkout@v2 + with: + ref: gh-pages + path: build/html - name: Setup Mambaforge Python 3.7 uses: conda-incubator/setup-miniconda@v2 with: @@ -58,8 +61,6 @@ jobs: git config user.name github-actions git config user.email github-actions@github.com cd documentation - rm -rf build/html - git clone --single-branch --branch gh-pages --origin official git@github.com:ReactionMechanismGenerator/RMG-Py.git build/html make html - name: Check documentation links continue-on-error: true From a5c74170c9249605d18c247d68fb5c86890cd0aa Mon Sep 17 00:00:00 2001 From: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:23:04 -0500 Subject: [PATCH 2/2] run checkout command twice, once per needed branch this was originally cloning main and then gh-pages, restoring this behavior (but using the checkout step rather than manually git calls) since the environment.yml file stored in main is needed for later steps --- .github/workflows/docs.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3139afe15e..046b22fcdb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,9 +16,6 @@ jobs: shell: bash -l {0} steps: - uses: actions/checkout@v2 - with: - ref: gh-pages - path: build/html - name: Setup Mambaforge Python 3.7 uses: conda-incubator/setup-miniconda@v2 with: @@ -46,6 +43,10 @@ jobs: cd RMG-Py sed -i '/embedsignature/s/# //g' setup.py make + - uses: actions/checkout@v2 + with: + ref: gh-pages + path: build/html - name: Make documentation - for testing if: ${{ github.event_name != 'push' || github.repository != 'ReactionMechanismGenerator/RMG-Py' }} run: |