-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (47 loc) · 1.36 KB
/
cd.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
name: Continuous Deployment
on:
push:
branches:
- 'master'
tags-ignore:
- '*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Cache ruby (bundler) dependencies
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set bundle path to vendor/bundle
run: bundle config path vendor/bundle
- name: Install bundle dependencies if not cached
if: steps.bundle_cache.outputs.cache-hit != 'true'
run: bundle install --jobs 4 --retry 3
- name: Install npm dependencies
run: npm install
- name: Lint
run: npm run pretty-quick
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run release
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: release