# One-click deployment of the hexo blog

## up.sh

{% hint style="info" %}
Before you do this, you need to make sure that you have configured SSH keys. If not, you can see the one-click SSH key generation tutorial, which was in the previous article.
{% endhint %}

You need to right-click git bash in the directory where the install.sh script is stored and run the following command:

```bash
source install.sh deploy
```

![下载up.sh](/files/-LlutGTSONJsGgLT-HB3)

{% hint style="info" %}
You need to copy up.sh into the hexoblog file, which is your blog root directory
{% endhint %}

![](/files/-LluzdSM_MrB7O9qCs1Z)

然后在存放up.sh脚本的目录中,右键打开git bash运行以下命令:

```bash
source up.sh
```

{% hint style="success" %}
It is then automatically deployed to your github or coding
{% endhint %}

{% hint style="danger" %}
If the upload fails you need to check to see if you have installed the latest version of \[hexo-script] or configured deploy information in the root directory.
{% endhint %}

{% hint style="danger" %}
If you don't know how to configure it, check out this tutorial:
{% endhint %}

## Deploy the necessary configuration for the blog

First you need to open the root configuration file \_config.yml

![](/files/-LluxHhrwiYvRhAnlHXs)

> Find deploy, which is usually in the last line, and change it to the following format

![](/files/-LluyCdpQ92nd8tuqn9Z)

{% hint style="info" %}
You just need to modify the information behind the repo
{% endhint %}

```
deploy:
  type: git
  repo: Fill in your warehouse address here, it is recommended to use SSH address, which is beginning with git
  branch: master
```

After version 1.3 of \[heox-script] you do not need to install the upload plug-in yourself, but if an error is reported showing that the upload plug-in was not successfully installed, you need to execute the following command

```
cnpm install hexo-deployer-git --save
or you can run :npm install hexo-deployer-git --save
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hexoscript.gitbook.io/hexo-script/shi-yong-bu-zhou/yi-jian-bu-shu-hexo-bo-ke.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
