mirror of
https://github.com/zhigang1992/now-deployment.git
synced 2026-04-29 04:25:28 +08:00
docs: example
This commit is contained in:
4
.github/workflows/prod.yml
vendored
4
.github/workflows/prod.yml
vendored
@@ -1,11 +1,11 @@
|
||||
name: deploy website preview
|
||||
name: production
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
prod:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
21
.github/workflows/static.yml
vendored
Normal file
21
.github/workflows/static.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: deploy website preview
|
||||
on:
|
||||
push:
|
||||
# branches:
|
||||
# - master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: static
|
||||
run: |
|
||||
echo 'static example'
|
||||
cd example/static
|
||||
- uses: ../../
|
||||
id: now-deployment
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
zeit-token: ${{ secrets.ZEIT_TOKEN }}
|
||||
now-args: '--prod'
|
||||
2
example/static/index.html
Normal file
2
example/static/index.html
Normal file
@@ -0,0 +1,2 @@
|
||||
yay
|
||||
22
|
||||
15
example/static/now.json
Normal file
15
example/static/now.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "zeit-now-deployment-action-example-static",
|
||||
"version": 2,
|
||||
"scope": "amond",
|
||||
"public": false,
|
||||
"github": {
|
||||
"enabled": false
|
||||
},
|
||||
"builds": [
|
||||
{ "src": "./public/**", "use": "@now/static" }
|
||||
],
|
||||
"routes": [
|
||||
{ "src": "/(.*)", "dest": "public/$1" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user