数据库引擎增加对环境变量 DATABASE_URL(DB_URL) 完整连接字符串的支持,并增加对 LibSQL(Turso) 与 Clo… #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to EdgeOne | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| edgeone: | |
| runs-on: ubuntu-latest | |
| name: "Deploy to EdgeOne" | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: platforms/edgeone | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 24 | |
| - name: Check Required Secrets | |
| run: | | |
| REQUIRED=(EDGEONE_PAGES_TOKEN EDGEONE_PAGES_PROJECT_NAME) | |
| for var in "${REQUIRED[@]}"; do | |
| if [ -z "${!var}" ]; then | |
| echo "❌ Error: $var is missing." | |
| exit 1 | |
| fi | |
| done | |
| env: | |
| EDGEONE_PAGES_TOKEN: ${{ secrets.EDGEONE_PAGES_TOKEN }} | |
| EDGEONE_PAGES_PROJECT_NAME: ${{ secrets.EDGEONE_PAGES_PROJECT_NAME }} | |
| - name: Inject Commit Hash & Platform | |
| run: node scripts/inject_vars.js --platform=edgeone | |
| - name: Deploy to EdgeOne | |
| run: | | |
| npx -y edgeone makers deploy . -n $EDGEONE_PAGES_PROJECT_NAME -t $EDGEONE_PAGES_TOKEN > /dev/null 2>&1 | |
| env: | |
| EDGEONE_PAGES_TOKEN: ${{ secrets.EDGEONE_PAGES_TOKEN }} | |
| EDGEONE_PAGES_PROJECT_NAME: ${{ secrets.EDGEONE_PAGES_PROJECT_NAME }} | |
| - name: Success Notification | |
| run: echo "🚀 NodeAuth deployed successfully to EdgeOne!" |