chore: update package.json scripts
							parent
							
								
									bda27eb39b
								
							
						
					
					
						commit
						69d5aa795a
					
				| 
						 | 
				
			
			@ -0,0 +1,68 @@
 | 
			
		|||
name: Build and Deploy to Cloudflare
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: [ 1.x ]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    name: Build Application
 | 
			
		||||
    permissions:
 | 
			
		||||
      contents: read
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v5
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
 | 
			
		||||
      - name: Setup Node
 | 
			
		||||
        uses: actions/setup-node@v4
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 20
 | 
			
		||||
 | 
			
		||||
      - name: Install root dependencies
 | 
			
		||||
        run: npm install --force
 | 
			
		||||
 | 
			
		||||
      - name: Install antdv-demo dependencies
 | 
			
		||||
        working-directory: antdv-demo
 | 
			
		||||
        run: npm install --force
 | 
			
		||||
 | 
			
		||||
      - name: Build application
 | 
			
		||||
        working-directory: antdv-demo
 | 
			
		||||
        run: npm run build
 | 
			
		||||
 | 
			
		||||
      - name: Upload build artifacts
 | 
			
		||||
        uses: actions/upload-artifact@v4
 | 
			
		||||
        with:
 | 
			
		||||
          name: build-files
 | 
			
		||||
          path: antdv-demo/_site/
 | 
			
		||||
          retention-days: 1
 | 
			
		||||
 | 
			
		||||
  deploy:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    name: Deploy to Cloudflare
 | 
			
		||||
    needs: build
 | 
			
		||||
    permissions:
 | 
			
		||||
      contents: read
 | 
			
		||||
      deployments: write
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout (for config files)
 | 
			
		||||
        uses: actions/checkout@v5
 | 
			
		||||
        with:
 | 
			
		||||
          sparse-checkout: |
 | 
			
		||||
            wrangler.jsonc
 | 
			
		||||
          sparse-checkout-cone-mode: false
 | 
			
		||||
 | 
			
		||||
      - name: Download build artifacts
 | 
			
		||||
        uses: actions/download-artifact@v4
 | 
			
		||||
        with:
 | 
			
		||||
          name: build-files
 | 
			
		||||
          path: antdv-demo/_site/
 | 
			
		||||
 | 
			
		||||
      - name: Deploy (Workers + Static Assets)
 | 
			
		||||
        uses: cloudflare/wrangler-action@v3.14.1
 | 
			
		||||
        with:
 | 
			
		||||
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} 
 | 
			
		||||
          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
 | 
			
		||||
          command: deploy --config wrangler.jsonc
 | 
			
		||||
          gitHubToken: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
| 
						 | 
				
			
			@ -12,7 +12,7 @@ let lessLoaderConfig = require('./lessLoaderConfig')('production');
 | 
			
		|||
module.exports = merge(baseWebpackConfig, {
 | 
			
		||||
  output: {
 | 
			
		||||
    path: path.resolve(__dirname, '../_site'),
 | 
			
		||||
    publicPath: 'https://aliyuncdn.antdv.com/v1/',
 | 
			
		||||
    publicPath: '/',
 | 
			
		||||
    filename: '[name].[contenthash:8].js',
 | 
			
		||||
    chunkFilename: '[contenthash:8].async.js',
 | 
			
		||||
  },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,9 +3,9 @@
 | 
			
		|||
  "title": "Ant Design Vue",
 | 
			
		||||
  "description": "An enterprise-class UI design language and Vue-based implementation",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "dev": "node --max_old_space_size=4096 build/dev.js",
 | 
			
		||||
    "start": "cross-env PORT=3001 NODE_ENV=development node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js --config build/webpack.dev.conf.js",
 | 
			
		||||
    "site": "node --max_old_space_size=4096 scripts/run.js _site",
 | 
			
		||||
    "dev": "node --openssl-legacy-provider --max_old_space_size=4096 build/dev.js",
 | 
			
		||||
    "start": "cross-env PORT=3001 NODE_ENV=development node --openssl-legacy-provider --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js --config build/webpack.dev.conf.js",
 | 
			
		||||
    "build": "node --openssl-legacy-provider --max_old_space_size=4096 scripts/run.js _site",
 | 
			
		||||
    "copy": "node scripts/run.js copy-html",
 | 
			
		||||
    "prettier": "prettier -c --write '**/*'",
 | 
			
		||||
    "pretty-quick": "pretty-quick"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
{
 | 
			
		||||
  "name": "antdv-v1",
 | 
			
		||||
  "compatibility_date": "2025-09-19",
 | 
			
		||||
  "assets": {
 | 
			
		||||
    "directory": "./antdv-demo/_site",
 | 
			
		||||
    "not_found_handling": "single-page-application"
 | 
			
		||||
  },
 | 
			
		||||
  "routes": [
 | 
			
		||||
    {
 | 
			
		||||
      "pattern": "1x.antdv.com/*",
 | 
			
		||||
      "zone_name": "antdv.com"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue