Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: restructure workflow for site builds and deployments #307

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: PR Preview

on:
pull_request:
branches:
- main

jobs:
build-and-deploy:
Expand All @@ -24,18 +22,12 @@ jobs:
- name: Set ARCO_SITE_DOMAIN
run: echo "ARCO_SITE_DOMAIN=preview-${{ github.event.number }}-arco-design-mobile.surge.sh" >> $GITHUB_ENV

- name: Build site:home
run: npm run site:home
env:
ARCO_SITE_DOMAIN: ${{ env.ARCO_SITE_DOMAIN }}

- name: Build site:pc
run: npm run site:pc
env:
ARCO_SITE_DOMAIN: ${{ env.ARCO_SITE_DOMAIN }}

- name: Build site:mobile
run: npm run site:mobile
- name: Build sites concurrently
run: |
npm run site:home &
npm run site:pc &
npm run site:mobile &
wait
env:
ARCO_SITE_DOMAIN: ${{ env.ARCO_SITE_DOMAIN }}

Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/test.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Unit Test
on:
push:
branches:
- main
pull_request:

jobs:
run-test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: setup node
uses: actions/setup-node@v2
with:
node-version: 16

- name: install
run: npm install

- name: test and collect coverage
run: npm run test

- name: upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Loading