diff --git a/website/docs/deployment.mdx b/website/docs/deployment.mdx index 2adc72bc91..0ceacff84b 100644 --- a/website/docs/deployment.mdx +++ b/website/docs/deployment.mdx @@ -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= + git config --global user.email "" + git config --global user.name "" + 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.