Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ljubon opened this issue Jun 20, 2024 · 0 comments

Comments

@ljubon
Copy link
Contributor

ljubon commented Jun 20, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant