-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
docs: update GitHub deployment instructions #5888
Conversation
Matches what is listed in the default README.md of a new Docusaurus site
documentation.yml as written fails to run because the minimum node version for Docusaurus is 14.x
✔️ [V2] 🔨 Explore the source changes: ef432fb 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61876335c3727a00076bf9f7 😎 Browse the preview: https://deploy-preview-5888--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5888--docusaurus-2.netlify.app/ |
Added one more commit that's more of a suggestion than a correction, but I think it would be helpful for folks who are less experienced to get started. |
Hi, thanks for the updates About setting |
@Josh-Cena Hmm, I guess I'm not sure on the SSH requirement. It errored with just
When I changed it by adding Now I have a GitHub action deploying it automatically, and it doesn't look like I can deploy at all using that command, so I'm not sure how to test this further. But it's definitely true that the current suggested command in the documentation does not work -- so it should be changed in some way. I was just suggesting that the documentation match the readme's line. |
Just checked my deployment config. I don't have - run:
name: Configure Git Credentials
command: |
git config --global user.email "[email protected]"
git config --global user.name "jchen-bot"
echo "machine github.com login jchen-bot password $GITHUB_BOT_PA_TOKEN" > ~/.netrc
- run:
name: Deploy to GitHub Pages
command: yarn deploy
environment:
GIT_USER: jchen-bot
ORGANIZATION_NAME: Josh-Cena
PROJECT_NAME: Josh-Cena.github.io
DEPLOYMENT_BRANCH: gh-pages
CURRENT_BRANCH: master I don't have the bandwidth to run a deployment right now. Could you show where your deployment is failing at? |
OK, I was able to reproduce it. To clarify, this was when I first started using Docusaurus, and I had no deployment config, at least in terms of a GitHub action. I did have a Personal Access Token set up in GitHub. I was following along at https://docusaurus.io/docs/deployment and had the following configured within Docusaurus: title: 'foo',
tagline: ' bar.',
url: 'https://rootwork.github.io',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'rootwork', // Usually your GitHub org/user name.
projectName: 'rootwork', // Usually your repo name. When I ran
I already had a PAT set up, as I mentioned above. I then changed the command to At the very least it seems like the documentation and the readme file should offer the same example command, even if there are multiple ways to do it. |
You not only need to set up the token, you need to actually use it. When it prompts for your password, you don't actually enter the password (confusing as it sounds), but the PAT with the correct access instead. In that case, maybe revert the SSH doc change, and add some more explanation about using PAT instead of password? It isn't wrong strictly |
Oh, that is confusing! Thanks for resolving this @Josh-Cena. |
Motivation
Following the deployment documentation at https://docusaurus.io/docs/deployment I noticed a couple of mistakes that I had to correct before I could do a successful deployment.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
N/A (documentation only)
Related PRs
None that I could find.