mirror of
https://github.com/zhigang1992/now-deployment.git
synced 2026-06-11 16:19:52 +08:00
34 lines
960 B
YAML
34 lines
960 B
YAML
name: example - static
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
static:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: ./
|
|
id: now-deployment-staging
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
zeit-token: ${{ secrets.ZEIT_TOKEN }}
|
|
now-org-id: ${{ secrets.NOW_ORG_ID }}
|
|
now-project-id: ${{ secrets.NOW_PROJECT_ID_STATIC }}
|
|
working-directory: example/static
|
|
- uses: ./
|
|
id: now-deployment-production
|
|
if: github.event_name == 'push'
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
zeit-token: ${{ secrets.ZEIT_TOKEN }}
|
|
now-org-id: ${{ secrets.NOW_ORG_ID }}
|
|
now-project-id: ${{ secrets.NOW_PROJECT_ID_STATIC }}
|
|
now-args: '--prod'
|
|
working-directory: example/static
|