Skip to content

TencentEdgeOne/edgeone-pages-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EdgeOne Pages Deploy Action

A GitHub Action to deploy your static sites to EdgeOne Pages.

Features

  • 🚀 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

Usage

Basic Example

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"

Next.js Example

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"

Inputs

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

Setup

1. Get EdgeOne API Token

  1. Visit EdgeOne Pages
  2. Generate your API token
  3. Copy the token for the next step

2. Add Repository Secret

  1. Go to your GitHub repository
  2. Navigate to SettingsSecrets and variablesActions
  3. Click New repository secret
  4. Name: EDGEONE_API_TOKEN
  5. Value: Your EdgeOne API token from step 1
  6. Click Add secret

3. Create Workflow

Create a .github/workflows/deploy.yml file in your repository with one of the examples above.

Supported Static Site Generators

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...

License

MIT License. See LICENSE for more information.

Support

About

Easily deploy EdgeOne pages applications using edgeone cli and github actions

Resources

License

Stars

Watchers

Forks

Packages

No packages published