-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.14 KB
/
push.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: push
on:
push:
branches: [main]
jobs:
test-publish-build-release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- run: npm install
- name: 🚧 Build
run: npm run build
- name: 🛠️ Build Demo
run: |
cd demo
npm install --legacy-peer-deps
npx papua build
- name: 🚀 Deploy Demo
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: demo
folder: demo/dist
- name: 🖥️ Serve Demo for Test
run: |
cd demo
# The & at the end ensures that the command exits
# and the server continues in the background.
npx papua serve &
- name: 🌲 Cypress Test
uses: cypress-io/github-action@v6
with:
install: false
# Wait for server above to start before testing.
wait-on: 'http://localhost:3000'
wait-on-timeout: 240
- name: 📢 Release
uses: tobua/release-npm-action@v3
with:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}