diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index 7409d952e1..e27844eea6 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -10,10 +10,16 @@ jobs: build-and-deploy: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@master - - name: deploy - uses: amondnet/now-deployment@v1 - with: - now-args: '--prod' - zeit-token: ${{ secrets.ZEIT_TOKEN }} + - uses: actions/checkout@v2 + - name: build + run: | + yarn install + yarn build + yarn build:doc + - name: deploy + env: + BUILD_ID: ${{ github.sha }} + ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }} + run: | + now --token=$ZEIT_TOKEN --confirm --prod --force --scope umijs + diff --git a/now-build.sh b/now-build.sh deleted file mode 100644 index 6034713244..0000000000 --- a/now-build.sh +++ /dev/null @@ -1,2 +0,0 @@ -yarn run init -yarn run build:doc \ No newline at end of file diff --git a/now.json b/now.json index efd22e2937..f515fcf3ec 100644 --- a/now.json +++ b/now.json @@ -1,30 +1,21 @@ { "name": "hooks", "scope": "umijs", + "version": 2, "builds": [ { - "src": "now-build.sh", - "use": "@now/static-build", - "config": { - "distDir": "dist" - } + "src": "./dist/**", + "use": "@now/static" } ], "routes": [ - { - "src": "/(.*).(js|css)", - "headers": { - "cache-control": "s-maxage=604800" - }, - "dest": "/$1" - }, - { - "src": "/(.*).(json)", - "dest": "/$1" - }, - { - "src": "/(.*)", - "dest": "/" - } + { "handle": "filesystem" }, + { "src": "/.*", "dest": "/index.html" } + ], + "github": { + "enabled": false + }, + "alias": [ + "hooks.umijs.org" ] } \ No newline at end of file