armadaproject/armada

CI: Automatic deploy of GitHub Pages doesn't work due to required protection on branches

ljubon opened this issue · 0 comments

Describe the bug

The CI Deploy GH Pages with it's current design is failing to push the latest changes from master to gh-pages due to protection over gh-pages branch which is in place

Files Or Markdown that can reproduce the issue

Reproduced: https://github.com/armadaproject/armada/actions/runs/9592573160

Expected behavior

When Deploy GH Pages workflow is triggered it should successfully publish changes to gh-pages branch which will then trigger the pages-build-deployment workflow and publish new content

Actual behavior

Current push to gh-pages is not working due to protected gh-pages branch

Additional context

Manual deploy is only way at the moment to update Armada page armadaproject.io

Steps to perform manual deploy from local machine
  • checkout master branch in master folder
  • checkout gh-pages branch in gh-pages folder
  • Follow steps below:
# Move files to `gh-pages` branch
cp master/docs/*.md gh-pages/
rm gh-pages/docs-readme.md
cp -r master/docs/developer gh-pages/
cp master/CODE_OF_CONDUCT.md master/CONTRIBUTING.md gh-pages/_pages/

# Commit and push changed files to `gh-pages` branch
cd gh-pages
git checkout feature/update-gh-pagex-XXX # name of new branch
git add . _pages
git commit -m "Updating Github Pages branch with latest Master changes"
git push origin feature/update-gh-pagex-XXX

Possible solutions:

  • Instead of pushing changes to gh-pages directly we can edit current workflow to open a PR to gh-pages which is valid way to respect security and still contribute to the branch
  • TBD