Skip to content

Commit

Permalink
doc: upgrade now config
Browse files Browse the repository at this point in the history
  • Loading branch information
brickspert committed Mar 2, 2020
1 parent 157b129 commit 2e6434d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 29 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions now-build.sh

This file was deleted.

31 changes: 11 additions & 20 deletions now.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

0 comments on commit 2e6434d

Please sign in to comment.