mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 10:48:05 +02:00
docs(v2): Add Buddy to deployment doc (#5027)
This commit is contained in:
parent
c96c3b5c39
commit
a865eb50b9
1 changed files with 22 additions and 0 deletions
|
@ -281,6 +281,28 @@ script:
|
|||
|
||||
Now, whenever a new commit lands in `master`, Travis CI will run your suite of tests and if everything passes, your website will be deployed via the `yarn deploy` script.
|
||||
|
||||
### Triggering deployment with Buddy {#triggering-deployment-with-buddy}
|
||||
|
||||
[Buddy](https://buddy.works/) is an easy-to-use CI/CD tool that allows you to automate the deployment of your portal to different environments, including GitHub Pages.
|
||||
|
||||
Follow these steps to create a pipeline that automatically deploys a new version of your website whenever you push changes to the selected branch of your project:
|
||||
|
||||
1. Go to https://github.com/settings/tokens and generate a new [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/). When creating the token, grant it the `repo` scope so that it has the permissions it needs.
|
||||
1. Sign in to your Buddy account and create a new project.
|
||||
1. Choose GitHub as your git hosting provider and select the repository with the code of your website.
|
||||
1. Using the left navigation panel, switch to the `Pipelines` view.
|
||||
1. Create a new pipeline. Define its name, set the trigger mode to `On push`, and select the branch that triggers the pipeline execution.
|
||||
1. Add a `Node.js` action.
|
||||
1. Add these command in the action's terminal:
|
||||
```bash
|
||||
GIT_USER=<GH_PERSONAL_ACCESS_TOKEN>
|
||||
git config --global user.email "<YOUR_GH_EMAIL>"
|
||||
git config --global user.name "<YOUR_GH_USERNAME>"
|
||||
yarn deploy
|
||||
```
|
||||
|
||||
After creating this simple pipeline, each new commit pushed to the branch you selected deploys your website to GitHub Pages using `yarn deploy`. Read [this guide](https://buddy.works/guides/react-docusaurus) to learn more about setting up a CI/CD pipeline for Docusaurus.
|
||||
|
||||
### Using Azure Pipelines {#using-azure-pipelines}
|
||||
|
||||
1. Sign Up at [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) if you haven't already.
|
||||
|
|
Loading…
Add table
Reference in a new issue