Created
July 29, 2020 09:14
-
-
Save tiannian/7b335c1f597f001ba7e98ce1b81b356d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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