rohit-gohri / redocusaurus

OpenAPI for Docusaurus with Redoc
https://redocusaurus.vercel.app/
MIT License
629 stars 114 forks source link

Extend deploy script to sign git commits. #303

Closed gm-ocelot closed 1 year ago

gm-ocelot commented 1 year ago

The scripts deployment starts failing when repositores forced to allow only signed git commits.

It seams there is no posibility to have custom commits command or flags to controll the commit command. https://github.com/facebook/docusaurus/blob/101e133f74115a7582835f6ea807c3e0fa40cd34/packages/docusaurus/src/commands/deploy.ts#L231

Here is the error

CMD: git commit -m "Deploy website - based on 0b16b67193125dbde835506b963dcdd1faf27964" (code: 0)
remote: error: GH006: Protected branch update failed for refs/heads/gh-pages.        
remote: error: Commits must have valid signatures.        
To github.com:****/****.git
 ! [remote rejected] gh-pages -> gh-pages (protected branch hook declined)
error: failed to push some refs to 'github.com:****/****.git'
CMD: git push --force origin gh-pages (code: 1)
Error: Running "git push" command failed.
    at runDeploy (/****/node_modules/@docusaurus/core/lib/commands/deploy.js:153:19)
    at async deploy (/****/node_modules/@docusaurus/core/lib/commands/deploy.js:174:13)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
rohit-gohri commented 1 year ago

I think you will have to open this issue in the docusaurus repo as this repo is just a plugin for it and doesn't control the deployment script logic