-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.67 KB
/
main.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
name: GitHub Actions Workflow
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Ruby environment
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Setup Node.js environment
uses: actions/setup-node@v4
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
~/.npm
./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package*.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules cache
continue-on-error: true
run: npm list
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: Install npm dependencies
run: |
npm ci
- name: Download icon fonts
run: |
npm run download-icons --if-present
ls -la _assets/styles/icons
- name: Formatting Rules
run: npm run prettier --if-present
- name: Code-Quality Rules
run: npm run lint --if-present
- name: Compile website
run: |
npm run build --if-present
npm run test --if-present