A GitHub Action to deploy your static sites to EdgeOne Pages.
- 🚀 Easy deployment to EdgeOne Pages
- 📦 Supports any static site generator (Next.js, React, Vue, etc.)
- ⚡ Fast and reliable deployment
- 🔧 Configurable build paths and project names
name: Deploy to EdgeOne Pages
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy to EdgeOne Pages
uses: TencentEdgeOne/edgeone-pages-action@v1
with:
token: ${{ secrets.EDGEONE_API_TOKEN }}
project-name: "my-awesome-site"
build-path: "./dist"
name: Deploy Next.js to EdgeOne Pages
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Build Next.js
run: npm run build
- name: Deploy to EdgeOne Pages
uses: TencentEdgeOne/edgeone-pages-action@v1
with:
token: ${{ secrets.EDGEONE_API_TOKEN }}
project-name: "my-nextjs-site"
build-path: "./out"
Input | Description | Required | Default |
---|---|---|---|
token |
EdgeOne API token | Yes | - |
project-name |
Project name for EdgeOne Pages | Yes | - |
build-path |
Path to the built static files | No | ./dist |
node-version |
Node.js version to use | No | 20 |
- Visit EdgeOne Pages
- Generate your API token
- Copy the token for the next step
- Go to your GitHub repository
- Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
EDGEONE_API_TOKEN
- Value: Your EdgeOne API token from step 1
- Click Add secret
Create a .github/workflows/deploy.yml
file in your repository with one of the examples above.
This action works with any static site generator that outputs static files:
- ✅ Next.js (with
output: 'export'
) - ✅ React (Create React App)
- ✅ Vue.js
- ✅ Nuxt.js
- ✅ Gatsby
- ✅ Vite
- ✅ Astro
- ✅ Hugo
- ✅ Jekyll
- ✅ And many more...
MIT License. See LICENSE for more information.