mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:48:55 +08:00
64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
name: gh-pages
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [16.x]
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
|
|
steps:
|
|
- uses: n1hility/cancel-previous-runs@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: build gh-pages
|
|
run: |
|
|
npm i --legacy-peer-deps
|
|
npm run build --workspaces
|
|
sh deploy-gh-pages.sh
|
|
- name: Deploy 🚀
|
|
uses: JamesIves/github-pages-deploy-action@3.7.1
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
BRANCH: gh-pages # The branch the action should deploy to.
|
|
FOLDER: gh-pages # The folder the action should deploy.
|
|
CLEAN: true # Automatically remove deleted files from the deploy branch
|
|
SINGLE_COMMIT: true
|
|
- name: Run All Tests AND Generate coverage report
|
|
run: |
|
|
npm run coverage --workspaces
|
|
- name: Upload amis-formula coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|
|
with:
|
|
files: ./packages/amis-formula/coverage/clover.xml
|
|
flags: amis-formula
|
|
- name: Upload amis-core coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|
|
with:
|
|
files: ./packages/amis-core/coverage/clover.xml
|
|
flags: amis-core
|
|
- name: Upload amis-ui coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|
|
with:
|
|
files: ./packages/amis-ui/coverage/clover.xml
|
|
flags: amis-ui
|
|
- name: Upload amis coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|
|
with:
|
|
files: ./packages/amis/coverage/clover.xml
|
|
flags: amis
|