Skip to content

publish-gh-pages doesn't run at a Windows command prompt #1749

@italicize

Description

@italicize

🐛 Bug Report

The publish-gh-pages script doesn't run at a Windows command prompt, with or without USE_SSH=true. The script runs in Git Bash. Why won't it run at a Windows command prompt?

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

At the Windows command prompt:

  1. cd to the website directory of a Docusaurus repository.
  2. Type GIT_USER=githubusername CURRENT_BRANCH=master USE_SSH=true npm run publish-gh-pages replacing githubusername and press Enter. (It fails on my system.)
  3. Type GIT_USER=githubusername CURRENT_BRANCH=master npm run publish-gh-pages replacing githubusername and press Enter. (It fails on my system.)

In Git Bash:

  1. cd to the website directory of a Docusaurus repository.
  2. Type GIT_USER=githubusername CURRENT_BRANCH=master USE_SSH=true npm run publish-gh-pages replacing githubusername and press Enter. (It fails on my system.)
  3. Type GIT_USER=githubusername CURRENT_BRANCH=master npm run publish-gh-pages replacing githubusername and press Enter. (It runs on my system.)

Expected behavior

Files in the build directory are copied to GitHub.

Actual Behavior

Files aren't copied to GitHub. An error message says, 'GIT_USER' is not recognized as an internal or external command, operable program or batch file. See the screen images.

SSH and HTTPS fail at the Windows command prompt:

publish-gh-pages-at-the-windows-command-prompt

SSH fails in Git Bash:

publish-gh-pages-in-git-bash-ssh

HTTPS runs in Git Bash:

publish-gh-pages-in-git-bash-html-start
. . .
publish-gh-pages-in-git-bash-html-end

Reproducible Demo

Test publish-gh-pages with any repository. My repository was from the Docusaurus tutorial. I copied the files in my local repository to this branch, https://github.com/italicize/doc-tutorial/tree/source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThe issue is related to the documentation of Docusaurusgood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions