diff --git a/.github/workflows/publish_website.yml b/.github/workflows/publish_website.yml index df61fe023a..771ff4f7ab 100644 --- a/.github/workflows/publish_website.yml +++ b/.github/workflows/publish_website.yml @@ -19,6 +19,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: 'docusaurus-versions' # release branch + fetch-depth: 0 + - name: Sync release branch with main + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git merge origin/main + # To avoid a large number of commits we don't push this sync commit to github until a new release. - name: Set up Python uses: actions/setup-python@v5 with: @@ -39,9 +48,6 @@ jobs: - if: ${{ inputs.new_version }} name: Create new docusaurus version run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - python3 scripts/convert_ipynb_to_mdx.py --clean cd website yarn @@ -49,7 +55,7 @@ jobs: git add --all git commit -m "Create version ${{ inputs.new_version }} of site in Docusaurus" - git push --force origin HEAD:main + git push --force origin HEAD:docusaurus-versions - name: Build website run: | bash scripts/build_docs.sh -b