2

Recently, I am studying the Docusaurus2 project.

Project address:7wate's wiki or https://github.com/7Wate/wiki

I mainly use gitea as code management, then synchronize to github, use github action to generate static web pages, and finally realize development preview through githubpages.

My Question

The gitea mirror repository is synchronized to github(overriding sync), how to protect the branch created by the github action from being deleted.

Or is there any other way to implement Github action? Or is there any other way for me to achieve the same?

Final

I'm a developer from a non-English speaking country, so please forgive me for any grammatical errors, and finally thank the viewers and answerers for their valuable responses to my question.

Hope you have a nice day!

I done

  • Search engines don't have the answer I want.
  • Gitea documentation says mirror repositories are overriding sync
  • Github protected branch read-only policy will cause github actions to fail to push
  • I did not ask the official question on github and gitea, because the official has clear documentation, so I think this is a vague question.
7Wate
  • 23
  • 3

1 Answers1

0

One workaround would be to duplicate your GitHub repository, meaning create a second repository on GitHub in which you can also push the same repository as the one synchronized from GitLab

From there, you can set your GitHub action on that second repository, and make sure said action starts with:

  • pulling from the first repository (to refresh its content)
  • generate your site (you you do now)

In that second repository, the branch created by the GitHub action will never be deleted, since the synchronization is done on the first repository.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250