2021-02-02 15:23:12 +08:00
|
|
|
name: gh-pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-03-26 23:13:25 +08:00
|
|
|
branches: [master]
|
2021-02-02 15:23:12 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-25 10:40:50 +08:00
|
|
|
node-version: [20.x]
|
2021-02-02 15:23:12 +08:00
|
|
|
# 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 }}
|
2023-04-21 15:44:42 +08:00
|
|
|
- uses: actions/checkout@master
|
2021-02-02 15:23:12 +08:00
|
|
|
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 }}
|
2022-02-15 14:17:27 +08:00
|
|
|
- name: build gh-pages
|
|
|
|
run: |
|
2022-04-20 16:11:30 +08:00
|
|
|
npm i --legacy-peer-deps
|
2023-07-03 14:31:27 +08:00
|
|
|
cd packages/office-viewer
|
2023-04-21 16:53:40 +08:00
|
|
|
npm i --legacy-peer-deps
|
|
|
|
cd ../../
|
2022-06-02 13:28:23 +08:00
|
|
|
npm run build --workspaces
|
2021-02-02 15:23:12 +08:00
|
|
|
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
|
2021-04-14 18:18:07 +08:00
|
|
|
SINGLE_COMMIT: true
|
2022-06-02 23:40:23 +08:00
|
|
|
- name: Generate coverage report
|
2022-11-02 19:22:53 +08:00
|
|
|
env:
|
2023-02-20 12:34:43 +08:00
|
|
|
NODE_OPTIONS: '--max-old-space-size=8192'
|
2022-04-20 16:11:30 +08:00
|
|
|
run: |
|
2022-06-02 23:40:23 +08:00
|
|
|
npm run coverage
|
2023-04-21 15:44:42 +08:00
|
|
|
- uses: codecov/codecov-action@v3
|
2022-06-02 17:05:20 +08:00
|
|
|
with:
|
2022-06-02 23:40:23 +08:00
|
|
|
name: codecov-umbrella # optional
|
2023-04-21 15:44:42 +08:00
|
|
|
fail_ci_if_error: false # optional (default = false)
|
2022-06-02 23:40:23 +08:00
|
|
|
verbose: true # optional (default = false)
|