-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.19 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
name: Continuous Integration
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- uses: pnpm/action-setup@v2.2.1
with:
version: 8
run_install: |
args: [--shamefully-hoist]
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test
- name: Commit
env:
PUBLISH_GLOB: lib
PUBLISH_USER: github-actions
PUBLISH_EMAIL: actions@users.noreply.github.com
run: |
git config user.name ${PUBLISH_USER}
git config user.email ${PUBLISH_EMAIL}
git add ${PUBLISH_GLOB} -f
git status # useful for debugging
git commit -m "chore: deploy website [skip ci]" || exit 0
- name: Deploy
if: github.ref == 'refs/heads/master' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: ${{ github.ref }}