Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(v1): added drone for 1.0 #3491 #3538

Merged
merged 2 commits into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions website-1.x/docs/getting-started-publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,40 @@ steps:
displayName: 'yarn install and build'
```

### Using Drone

1. Create a new ssh key that will be the [deploy key](https://docs.github.com/en/free-pro-team@latest/developers/overview/managing-deploy-keys#deploy-keys) for your project.
1. Name your private and public keys to be specific and so that it does not overwrite your other [ssh keys](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).
1. Go to https://github.com/USERNAME/REPO/settings/keys and add a new deploy key by pasting in our public key you just generated.
1. Open your Drone.io dashboard and login. The URL looks like https://cloud.drone.io/USERNAME/REPO.
1. Click on the repository, click on activate repository, and add a secret called `git_deploy_private_key` with your private key value that you just generated.
1. Create a `.drone.yml` on the root of your repository with below text.

```yaml
# .drone.yml
kind: pipeline
type: docker
trigger:
event:
- tag
- name: Website
image: node
commands:
- mkdir -p $HOME/.ssh
- ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts
- echo "$GITHUB_PRIVATE_KEY > $HOME/.ssh/id_rsa"
- chmod 0600 $HOME/.ssh/id_rsa
- cd website
- npm i
- npm run publish-gh-pages
environment:
USE_SSH: true
GIT_USER: $DRONE_COMMIT_AUTHOR
GITHUB_PRIVATE_KEY: git_deploy_private_key
```

Now, whenever you push a new tag to github, this trigger will start the drone ci job to publish your website.

### Hosting on Vercel

Deploying your Docusaurus project to [Vercel](https://vercel.com/) will provide you with [various benefits](https://vercel.com/) in the areas of performance and ease of use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,40 @@ steps:
displayName: 'yarn install and build'
```

### Using Drone

1. Create a new ssh key that will be the [deploy key](https://docs.github.com/en/free-pro-team@latest/developers/overview/managing-deploy-keys#deploy-keys) for your project.
1. Name your private and public keys to be specific and so that it does not overwrite your other [ssh keys](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).
1. Go to https://github.com/USERNAME/REPO/settings/keys and add a new deploy key by pasting in our public key you just generated.
1. Open your Drone.io dashboard and login. The URL looks like https://cloud.drone.io/USERNAME/REPO.
1. Click on the repository, click on activate repository, and add a secret called `git_deploy_private_key` with your private key value that you just generated.
1. Create a `.drone.yml` on the root of your repository with below text.

```yaml
# .drone.yml
kind: pipeline
type: docker
trigger:
event:
- tag
- name: Website
image: node
commands:
- mkdir -p $HOME/.ssh
- ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts
- echo "$GITHUB_PRIVATE_KEY > $HOME/.ssh/id_rsa"
- chmod 0600 $HOME/.ssh/id_rsa
- cd website
- npm i
- npm run publish-gh-pages
environment:
USE_SSH: true
GIT_USER: $DRONE_COMMIT_AUTHOR
GITHUB_PRIVATE_KEY: git_deploy_private_key
```

Now, whenever you push a new tag to github, this trigger will start the drone ci job to publish your website.

### Hosting on ZEIT Now

With [ZEIT Now](#using-zeit-now), you can deploy your site and connect it to [GitHub](https://zeit.co/github) or [GitLab](https://zeit.co/gitlab) to automatically receive a new deployment every time you push a commit.
Expand Down