Skip to content

Instantly share code, notes, and snippets.

@tiannian
Created July 29, 2020 09:14
Show Gist options
  • Select an option

  • Save tiannian/7b335c1f597f001ba7e98ce1b81b356d to your computer and use it in GitHub Desktop.

Select an option

Save tiannian/7b335c1f597f001ba7e98ce1b81b356d to your computer and use it in GitHub Desktop.
name: Node.js CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install deps
run:
yarn
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: Build
run: yarn build
env:
GITHUB_ACTION_PATH: /
- name: Config ossutil
uses: manyuanrong/setup-ossutil@v1.0
with:
endpoint: "oss-cn-shenzhen.aliyuncs.com"
access-key-id: ${{secrets.OSS_KEY_ID}}
access-key-secret: ${{secrets.OSS_KEY_SECRET}}
sts-token: ""
- name: Upload to OSS
run: ossutil cp -rf dist/ oss://curdata-cloud-protal/ -u
name: Node.js CI
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install deps
run:
yarn
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: Build
run: yarn build
env:
GITHUB_ACTION_PATH: /${{github.head_ref}}/
- name: Config ossutil
uses: manyuanrong/setup-ossutil@v1.0
with:
endpoint: "oss-cn-shenzhen.aliyuncs.com"
access-key-id: ${{secrets.OSS_KEY_ID}}
access-key-secret: ${{secrets.OSS_KEY_SECRET}}
sts-token: ""
- name: Upload to OSS
run: ossutil cp -rf dist/ oss://curdata-cloud/prs/${{github.head_ref}} -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment