-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.66 KB
/
test.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
name: test
on:
push:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
# - name: Cache resources
# id: cache-resources
# uses: actions/cache@v3
# with:
# path: resources
# key: hugo-resources
- name: Get npm cache directory
id: get-npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Cache npm
id: npm-cache
uses: actions/cache@v3
with:
path: ${{ steps.get-npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: List state of npm modules
if: ${{ steps.npm-cache.outputs.cache-hit != 'true' }}
continue-on-error: true
run: npm list
- name: Setup npm
run: npm ci
- name: Build style
run: npm run build:style
- name: Build site
run: npm run build:hugo -- --baseURL "https://disktree.github.io/stritter.audio"
- name: Run tests
run: npm test
- name: Deploy to gh-pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: public
clean: true
single-commit: true
- name: Store
uses: actions/upload-artifact@v3
with:
name: stritter.audio
path: public
retention-days: 7