From 4a5987c4766363bb682ee2db2669f88b93e07e3b Mon Sep 17 00:00:00 2001 From: Ryan Goodfellow Date: Wed, 13 Nov 2024 22:57:48 -0800 Subject: [PATCH] ci: deploy: configure git before rebase Signed-off-by: Ryan Goodfellow --- .github/workflows/asciidoc-build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/asciidoc-build.yml b/.github/workflows/asciidoc-build.yml index 1c406dcf54..b71873db7b 100644 --- a/.github/workflows/asciidoc-build.yml +++ b/.github/workflows/asciidoc-build.yml @@ -59,7 +59,7 @@ jobs: deploy: needs: build - if: github.repository == 'p4lang/p4-spec' && github.ref_name == 'main' + #if: github.repository == 'p4lang/p4-spec' && github.ref_name == 'main' runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -67,8 +67,15 @@ jobs: # Fetch all history for all branches fetch-depth: 0 + - name: Configure git + run: | + git config user.name "GitHub Actions" + git config user.email "p4lang@users.noreply.github.com" + - name: Rebase gh-pages branch run: | + git fetch --all + git pull --all git checkout gh-pages git rebase --quiet main @@ -90,10 +97,6 @@ jobs: name: api-charter path: api-charter - - name: Configure git - run: | - git config user.name "GitHub Actions" - git config user.email "p4lang@users.noreply.github.com" - name: Copy files run: |