docs: update GitHub deployment instructions (#5888)

* SSH is required for GitHub deployment now

Matches what is listed in the default README.md of a new Docusaurus site

* Minimum node version required is 14.x

documentation.yml as written fails to run because the minimum node version for Docusaurus is 14.x

* Add link to default URL of locally-served site

* Correct deployment workflow

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
Ivan Boothe 2021-11-06 22:29:56 -07:00 committed by GitHub
parent b25031ceae
commit effa46e930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,8 @@ Docusaurus includes a [`docusaurus serve`](cli.md#docusaurus-serve-sitedir) comm
npm run serve
```
By default this will load your site at [http://localhost:3000/](http://localhost:3000/).
## Trailing slash configuration {#trailing-slashes}
Docusaurus has a [`trailingSlash` config](./api/docusaurus.config.js.md#trailing-slash), to allow customizing URLs/links and emitted filename patterns.
@ -169,6 +171,14 @@ cmd /C 'set "GIT_USER=<GITHUB_USERNAME>" && yarn deploy'
</Tabs>
````
:::caution
Beginning in August 2021, GitHub requires every command-line sign-in to use the **personal access token** instead of the password. When GitHub prompts for your password, enter the PAT instead. See the [GitHub documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for more information.
Alternatively, you can use SSH (`USE_SSH=true`) to login.
:::
### Triggering deployment with GitHub Actions {#triggering-deployment-with-github-actions}
[GitHub Actions](https://help.github.com/en/actions) allow you to automate, customize, and execute your software development workflows right in your repository.
@ -205,7 +215,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '14.x'
- name: Test Build
run: |
if [ -e yarn.lock ]; then
@ -223,7 +233,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '14.x'
- uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}