Skip to content

Commit

Permalink
docs(v2): Add Buddy to deployment doc (#5027)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekpapiernik authored Jun 21, 2021
1 parent c96c3b5 commit a865eb5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions website/docs/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a865eb5

Please sign in to comment.