-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (58 loc) · 1.78 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ci:
name: ci
runs-on: ubuntu-latest
steps:
- name: Check out Git repository ⏬
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Set up Node.js 💿
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: pnpm
- name: Install dependencies 💤
run: pnpm install
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
id: nx-sha
with:
main-branch-name: master
# - name: Check for Affected Projects
# id: affected-packages
# run: npx nx show projects --affected >> $GITHUB_OUTPUT
- id: affected-packages
run: |
{
echo 'affected<<EOF'
npx nx show projects --affected
echo EOF
} >> "$GITHUB_OUTPUT"
- run: echo ${{steps.affected-packages.outputs.affected}}
# - name: Check formatting 🎨
# run: npx nx format:check
# - name: Lint and build projects 👷♀️
# run: npx nx affected -t lint build publint
# - name: Deploy demo page 🚀
# if: github.ref == 'refs/heads/master' && contains(steps.affected-packages.outputs.affected, 'demo')
# uses: peaceiris/actions-gh-pages@v4
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./packages/demo/dist