mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 10:17:55 +02:00
feat-add-azion-deployment
This commit is contained in:
parent
5bab0b5432
commit
a859dabe80
1 changed files with 95 additions and 0 deletions
|
@ -851,3 +851,98 @@ See [docs](https://docs.quantcdn.io/docs/cli/continuous-integration) and [blog](
|
|||
[Kinsta Static Site Hosting](https://kinsta.com/static-site-hosting) lets you deploy up to 100 static sites for free, custom domains with SSL, 100 GB monthly bandwidth, and 260+ Cloudflare CDN locations.
|
||||
|
||||
Get started in just a few clicks by following our [Docusaurus on Kinsta](https://kinsta.com/docs/docusaurus-example/) article.
|
||||
|
||||
## Deploying to Azion {#deploying-to-azion}
|
||||
|
||||
[Azion](https://www.azion.com.br/) Azion is a fully integrated edge computing platform that delivers better performance, security, reliability, and efficiency for any workload. Our highly distributed architecture includes edge nodes strategically located within Internet Service Providers (ISPs) around the world, spanning across four continents, guaranteeing the fastest and most reliable connectivity.
|
||||
|
||||
To deploy your Docusaurus site to Azion, follow these steps:
|
||||
|
||||
### Start from Template
|
||||
|
||||
To start using template, access [Azion Console](https://console.azion.com/) and click the **+ Create button** on the homepage.
|
||||
|
||||
This will open a modal where you can select **Templates** > **Docusaurus Boilerplate** card.
|
||||
|
||||
In the configuration form, you must provide the information to configure your new application. Fill in the presented fields.
|
||||
|
||||
Fields identified with an asterisk are mandatory.
|
||||
|
||||
1. Connect Azion with your GitHub account.
|
||||
|
||||
- A pop-up window will open to confirm the installation of the Azion GitHub App, a tool that connects your GitHub account with Azion’s platform.
|
||||
- Define your permissions and repository access as desired.
|
||||
|
||||
2. Select the **Git Scope** to work with.
|
||||
3. Define a name for your edge application.
|
||||
|
||||
- The bucket for storage and the edge function will use the same name.
|
||||
- Use a unique and easy-to-remember name. If the name has already been used, the platform returns an error message.
|
||||
|
||||
4. Click the **Deploy** button to start the deployment process.
|
||||
During the deployment, you’ll be able to follow the process through a window showing off the logs. When it’s complete, the page shows information about the application and some options to continue your journey.
|
||||
|
||||
> [!NOTE]
|
||||
> The link to the edge application allows you to see it on the browser. However, it takes a certain time to propagate and configure the application in Azion’s edge locations. It may be necessary to wait a few minutes for the URL to be activated and for the application page to be effectively displayed in the browser.
|
||||
|
||||
### Importing from GitHub
|
||||
|
||||
1. Access [Azion Console](https://console.azion.com).
|
||||
2. On the homepage, click the **\+ Create** button.
|
||||
- This opens a modal with the options to create new applications and resources.
|
||||
3. Select the **Import from GitHub** option and click the card.
|
||||
- This action opens the settings page.
|
||||
4. Connect your Azion account with GitHub.
|
||||
- A pop-up window will appear asking for authorization.
|
||||
5. Select the repository you want to import from GitHub.
|
||||
6. Configure the build settings:
|
||||
- **Framework preset:** Select the appropriate framework (e.g., `Docusaurus`).
|
||||
- **Root Directory:** it refers to the directory in which your code is located. Your code must not be located in a subdirectory, but be located at the root directory. A ./ symbol appears in this field, indicating it’s a root directory.
|
||||
- **Install Command:** the command that compiles your settings to build for production. Build commands are executed through scripts. For example: npm run build or npm install for the npm package.
|
||||
7. Click **Save and Deploy**.
|
||||
8. Monitor the deployment using **Azion Real-Time Metrics** and verify your site is live on the edge.
|
||||
|
||||
|
||||
### Deploying Using Azion CLI
|
||||
|
||||
1. **Install the Azion CLI:**
|
||||
|
||||
- Download and install the [Azion CLI](https://www.azion.com/en/documentation/products/azion-cli/overview/) for easier management and deployment.
|
||||
|
||||
2. **Authenticate the CLI:**
|
||||
|
||||
- Run the following command to authenticate your CLI with your Azion account.
|
||||
|
||||
```bash
|
||||
azion login
|
||||
```
|
||||
|
||||
3. **Set Up Your Application:**
|
||||
|
||||
- Use the following commands to initialize and configure your project:
|
||||
```bash
|
||||
azion init
|
||||
```
|
||||
- If you are importing the application, use the following command to link and configure your project:
|
||||
|
||||
```bash
|
||||
azion link
|
||||
```
|
||||
4. **Build Your Astro Project:**
|
||||
- Run your build command locally:
|
||||
|
||||
```bash
|
||||
azion build
|
||||
```
|
||||
5. **Deploy Your Static Files:**
|
||||
|
||||
- Deploy your static files using the Azion CLI:
|
||||
|
||||
```bash
|
||||
azion deploy
|
||||
```
|
||||
|
||||
Get started in a few minutes by following [this step-by-step guide](https://www.azion.com/en/documentation/products/guides/docusaurus-javascript-boilerplate/).
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue