Skip to content

Commit

Permalink
docs: update GitHub deployment instructions (#5888)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
rootwork and Josh-Cena committed Nov 7, 2021
1 parent b25031c commit effa46e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions website/docs/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit effa46e

Please sign in to comment.