• Product Introduction
  • Quick Start
    • Agent Development
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
    • Start with AI
  • Framework Guide
    • Agent
    • Frontends
      • Vite
      • React
      • Vue
      • Hugo
      • Other Frameworks
    • Backends
    • Full-stack
      • Next.js
      • Nuxt
      • Astro
      • React Router
      • SvelteKit
      • TanStack Start
      • Vike
    • Custom 404 Page
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Building Output Configuration
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Using Github Actions
    • Using Gitlab CI/CD
    • Using CNB Plugin
    • Using IDE PlugIn
    • Using CodeBuddy IDE
  • Domain Management
    • Overview
    • Custom Domain
    • HTTPS Configuration
      • Overview
      • Apply for Free Certificate
      • Using Managed SSL Certificate
    • Configure DNS CNAME Record
  • Observability
    • Overview
    • Metric Analysis
    • Log Analysis
  • Functions
    • Overview
    • Edge Functions
    • Cloud Functions
      • Overview
      • Node.js
      • Python
      • Go
  • Agents
    • Overview
    • Quick Start
    • Conversation Storage
    • Observability
    • Sandbox Tool
      • Overview
      • Using the Agent Framework
      • Sandbox Atomic API
      • Network Search Tool
    • Agent Authentication
  • Models
    • Overview
    • Models and Vendors
      • Overview
      • Using Vendor Keys
        • OpenAI
        • Anthropic
        • Google AI Studio
        • DeepSeek
        • MiniMax
        • Hunyuan
        • Zhipu
        • MoonShot AI
    • FAQs
  • Storage
    • Overview
    • KV
    • Blob
  • Middleware
  • AI Tools
    • MCP
    • Skills
    • Plugin
  • Copilot
    • Overview
    • Quick Start
  • API Token
  • EdgeOne CLI
  • Message Notification
  • Integration Guide
    • AI
      • Dialogue Large Models Integration
      • Large Models for Images Integration
    • Database
      • Supabase Integration
      • Pages KV Integration
    • Ecommerce
      • Shopify Integration
      • WooCommerce Integration
    • Payment
      • Stripe Integration
      • Integrating Paddle
    • CMS
      • WordPress Integration
      • Contentful Integration
      • Sanity Integration
      • Payload Integration
    • Authentication
      • Supabase Integration
      • Clerk Integration
  • Best Practices
    • AI Dialogue Deployment: Deploy Project with One Sentence Using Skill
    • Using General Large Model to Quickly Build AI Application
    • Use the DeepSeek model to quickly build a conversational AI site
    • Building an Ecommerce Platform with Shopify
    • Building a SaaS Site Using Supabase and Stripe
    • Building a Company Brand Site Quickly
    • How to Quickly Build a Blog Site
  • Migration Guides
    • Migrating from Vercel to EdgeOne Pages
    • Migrating from Cloudflare Pages to EdgeOne Pages
    • Migrating from Netlify to EdgeOne Pages
  • Troubleshooting
  • FAQs
  • Limits
  • Pricing
  • Contact Us
  • Release Notes

Using Github Actions

By following the guidelines in this section, you can quickly integrate an Actions workflow into your GitHub repository to automatically build and deploy to EdgeOne Makers.

Set GitHub Repository Secrets

To run this Actions, you need to create repository Secrets in GitHub:
Access your GitHub repository webpage.
Go to Settings > Secrets and variables > Actions.
Click New repository secret.
Enter EDGEONE_API_TOKEN in "Name" and the EdgeOne API token value in "Secret".
To obtain EDGEONE_API_TOKEN, refer to the document API Token.

Deploying Trunk Code Changes

The complete .github/workflows/deploy.yml configuration is as follows:
name: Build and Deploy

# Trigger deployment on branch push to main trunk
on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.11.0' # select suitable Node.js version
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Deploy to EdgeOne Makers
run: npx edgeone makers deploy <outputDirectory> -n <projectName> -t ${{ secrets.EDGEONE_API_TOKEN }} [-e <env>]
env:
EDGEONE_API_TOKEN: ${{ secrets.EDGEONE_API_TOKEN }}
Configure the above deploy.yml file in your project root directory. When code is pushed to the main branch, it will trigger the following build process:
1. Check out to the target repository.
2. Set the Node.js version to 22.11.0.
3. Install project dependencies.
4. Build project.
After the build is complete, return to the console to view the build link, or navigate to Actions > All workflows > Build and Deploy in the current repository to view the Deploy to EdgeOne Makers node.
workflow_deploy_pagas
workflow_deploy_pagas


Deploying Preview URL before Code Merge

The complete .github/workflows/deploy.yml configuration is as follows:

name: Build and Deploy

on:
pull_request_target:
types: [opened]

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.11.0' # select suitable Node.js version

- name: Install dependencies
run: npm install
- name: Build project
run: npm run build

- name: Deploy to EdgeOne Makers
id: deploy
run: |
echo "Deploying to EdgeOne Makers..."
DEPLOY_OUTPUT=$(npx edgeone makers deploy ./.next -n next-mix-render-template -t ${{ secrets.EDGEONE_TOKEN }} -e preview 2>&1)
DEPLOY_URL=$(echo "$DEPLOY_OUTPUT" | grep "EDGEONE_DEPLOY_URL=" | cut -d'=' -f2-)
echo "DEPLOY_URL=$DEPLOY_URL" >> $GITHUB_OUTPUT
PROJECT_ID=$(echo "$DEPLOY_OUTPUT" | grep "EDGEONE_PROJECT_ID=" | cut -d'=' -f2-)
echo "PROJECT_ID=$PROJECT_ID" >> $GITHUB_OUTPUT

DEPLOY_END_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "DEPLOY_END_TIME=$DEPLOY_END_TIME" >> $GITHUB_OUTPUT

env:
EDGEONE_API_TOKEN: ${{ secrets.EDGEONE_TOKEN }}

- name: Enable PR comments # Support preview URL deployment before code merge
uses: thollander/actions-comment-pull-request@v2
with:
message: |
🚀 **EdgeOne Makers Deployment Completed**
| Project | Preview Link | Project ID | Update Time |
|---|---|---|---|
| [${{ github.event.repository.name }}](https://console.tencentcloud.com/edgeone/pages/project/${{ steps.deploy.outputs.PROJECT_ID }}/deploy) | [🔗 Click to Preview](${{ steps.deploy.outputs.DEPLOY_URL }}) | ${{ steps.deploy.outputs.PROJECT_ID }} | ${{ steps.deploy.outputs.DEPLOY_END_TIME }} |
Configure the above deploy.yml file in your project root directory. When a pull request is created, it will trigger the following build process:
1. Check out to the target repository.
2. Set the Node.js version to 22.11.0.
3. Install project dependencies.
4. Build project.
5. The pull request comment area will display EdgeOne deployment successful information. You can review page changes before merging code.



Note:
npx edgeone makers deploy Parameter Description:
<outputDirectory>: The folder where the project build product is located (required).
-n, --name: The project name to be deployed. A new project will be created automatically if it does not exist (required).
-e, --env: The target environment to deploy. Available values: production or preview (default production).
Example: npx edgeone makers deploy ./dist -n project-name -t ${{ secrets.EDGEONE_API_TOKEN }}.

EdgeOne Makers Deployment

After the build is complete, the project will be automatically deployed to EdgeOne Makers through the following steps:
Build stage generates ./out directory
Deploy using the EdgeOne CLI: npx edgeone makers deploy ./out -n my-edgeone-pages-project -t ${{ secrets.EDGEONE_API_TOKEN }}
GitHub Actions relevant information is viewable in documentation.

ai-agent
You can ask me like
What types of applications can I deploy?