-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (44 loc) · 1.17 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
name: Foundations CI
on:
push:
branches: [main]
pull_request:
branches: [main]
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set the correct npm version
run: nvm install && nvm use
- name: Install dependencies from npm
run: |
nvm use
npm ci
- name: Build Foundations
run: |
nvm use
npm run build
- name: Confirm the build hasn't changed any files
run: ./check-pristine-state package-lock.json
- name: Run tests
run: |
nvm use
npm test
- name: Build Sass docs
if: github.ref == 'refs/heads/main'
run: |
nvm use
npm run sassdoc
- name: Deploy Sass docs to backpack.github.io, if on main branch
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
personal_token: ${{ secrets.DEPLOY_TOKEN }}
publish_dir: dist-sassdoc/
keep_files: false
external_repository: backpack/sassdoc
publish_branch: main