forked from christian-fei/Simple-Jekyll-Search
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 914 Bytes
/
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
name: Simple-Jekyll-Search
on: [push]
jobs:
build_deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: install
run: npm install
- name: test
run: npm t
# - name: start server for uat
# run: npx http-server example/_site -p 4000
# - name: uat
# uses: cypress-io/github-action@v2
# with:
# record: false
# # cache-key: node-v${{ matrix.node }}-on-${{ runner.os }}-hash-${{ hashFiles('package-lock.json') }}
# TODO delete this step in the next release
- name: Branch Name
run: echo ${GITHUB_REF}
- name: publish
if: contains(github.ref, 'refs/tags/')
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
npm publish