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

How to deploy the pages to another remote? #128

Open
taicaile opened this issue Oct 18, 2021 · 2 comments
Open

How to deploy the pages to another remote? #128

taicaile opened this issue Oct 18, 2021 · 2 comments

Comments

@taicaile
Copy link

Hello,

Is there a way to add remote configuration for mkdocs gh-deploy command in Github Action environment?

I am holding the docs in a private repo, and I want the docs to be pushed to another remote repo that is publicly available.

The command mkdocs gh-deploy can specify the remote by --remote option, I don't know how to use it in a Github Action environment.

Any suggestions? I have tried to add remote as the following URL:

https://$USER_NAME:[email protected]/$DESTINATION_REPOSITORY_USERNAME/$DESTINATION_REPOSITORY_NAME.git

But this gives the following error

remote: Permission to xxx/blog.git denied to github-actions[bot].
@WillNilges
Copy link

Don't suppose you ever figured this out, did you? I'm getting a similar issue, but I'm just trying to make it deploy when I commit anything at all to the markdown...

@andi34
Copy link

andi34 commented Sep 5, 2024

https://github.com/andi34/mkdocs-deploy-gh-pages/tree/nomaterial

Added to my fork.

Needs

      - name: Checkout main
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.PAT_TOKEN }} # Uses Personal Access Token (PAT) for checkout, needed to push Changes to Another Repository

Also define GITHUB_ORIGIN and PERSONAL_TOKEN`.

Example:
https://github.com/PhotoboothProject/photobooth/blob/dev/.github/workflows/publish_docs.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants