feat: release v1.6.6 provider runtime and toml unified settings #1
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: Docs EdgeOne Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - "docs/requirements-mkdocs.txt" | |
| - "scripts/deploy-docs-edgeone.js" | |
| - "scripts/run-mkdocs.js" | |
| - "package.json" | |
| - "package-lock.json" | |
| - "README.md" | |
| - ".github/workflows/docs-edgeone-publish.yml" | |
| workflow_dispatch: | |
| inputs: | |
| source_ref: | |
| description: "Branch, tag, or commit to publish from (for rollback)" | |
| required: false | |
| type: string | |
| deploy_env: | |
| description: "Deploy environment" | |
| required: false | |
| default: production | |
| type: choice | |
| options: | |
| - production | |
| - preview | |
| deploy_area: | |
| description: "Deploy area" | |
| required: false | |
| default: global | |
| type: choice | |
| options: | |
| - global | |
| - overseas | |
| project_name: | |
| description: "Override EdgeOne Pages project name" | |
| required: false | |
| type: string | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| jobs: | |
| docs-edgeone-publish: | |
| name: docs-edgeone-publish | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.source_ref != '' && github.event.inputs.source_ref || github.ref }} | |
| lfs: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| cache-dependency-path: docs/requirements-mkdocs.txt | |
| - name: Install MkDocs dependencies | |
| run: pip install -r docs/requirements-mkdocs.txt | |
| - name: Install Node dependencies | |
| run: npm ci | |
| - name: Install EdgeOne CLI | |
| run: npm install -g edgeone@1.3.5 | |
| - name: Resolve deployment config | |
| id: cfg | |
| shell: bash | |
| run: | | |
| PROJECT_NAME="${{ github.event.inputs.project_name }}" | |
| if [ -z "${PROJECT_NAME}" ]; then | |
| PROJECT_NAME="${{ vars.EDGEONE_PAGES_PROJECT_NAME }}" | |
| fi | |
| if [ -z "${PROJECT_NAME}" ]; then | |
| PROJECT_NAME="${{ secrets.EDGEONE_PAGES_PROJECT_NAME }}" | |
| fi | |
| if [ -z "${PROJECT_NAME}" ]; then | |
| echo "::error::Missing EDGEONE_PAGES_PROJECT_NAME (set workflow input, repository variable, or secret)." | |
| exit 1 | |
| fi | |
| DEPLOY_ENV="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_env || vars.EDGEONE_PAGES_ENV }}" | |
| if [ -z "${DEPLOY_ENV}" ]; then | |
| DEPLOY_ENV="production" | |
| fi | |
| DEPLOY_AREA="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_area || vars.EDGEONE_PAGES_AREA }}" | |
| if [ -z "${DEPLOY_AREA}" ]; then | |
| DEPLOY_AREA="global" | |
| fi | |
| echo "project_name=${PROJECT_NAME}" >> "$GITHUB_OUTPUT" | |
| echo "deploy_env=${DEPLOY_ENV}" >> "$GITHUB_OUTPUT" | |
| echo "deploy_area=${DEPLOY_AREA}" >> "$GITHUB_OUTPUT" | |
| - name: Validate token secret | |
| env: | |
| EDGEONE_PAGES_API_TOKEN: ${{ secrets.EDGEONE_PAGES_API_TOKEN }} | |
| shell: bash | |
| run: | | |
| if [ -z "${EDGEONE_PAGES_API_TOKEN}" ]; then | |
| echo "::error::Missing EDGEONE_PAGES_API_TOKEN secret." | |
| exit 1 | |
| fi | |
| - name: Build and deploy docs to EdgeOne Pages | |
| env: | |
| EDGEONE_PAGES_API_TOKEN: ${{ secrets.EDGEONE_PAGES_API_TOKEN }} | |
| EDGEONE_PAGES_PROJECT_NAME: ${{ steps.cfg.outputs.project_name }} | |
| EDGEONE_PAGES_ENV: ${{ steps.cfg.outputs.deploy_env }} | |
| EDGEONE_PAGES_AREA: ${{ steps.cfg.outputs.deploy_area }} | |
| run: npm run docs:edgeone:publish |