-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 912 Bytes
/
release.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
name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Run server
run: npm start &
env:
NODE_ENV: ci
- name: Wait
run: npx wait-on --timeout 5000 http://localhost:1234
- name: Run tests
run: npm test
- name: Build NPM package
run: npm run build
- name: Publish to Github pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d dist -u "github-actions-bot <[email protected]>" --nojekyll
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}