-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 918 Bytes
/
build.yaml
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
name: Test, Build and Deploy Example to GitHub-Pages
on: [ push ]
permissions:
contents: read
pages: write
id-token: write
jobs:
Build:
runs-on: ubuntu-latest
steps:
# Setup stuff
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 21
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
# Check and build project
- run: yarn install
- run: yarn check
- run: yarn build
- run: yarn test
# Generate example
- run: yarn workspace example generate:ci
- uses: actions/upload-pages-artifact@v3
with:
path: "./example/out"
- uses: actions/deploy-pages@v4
# publish library
- run: yarn npm publish
if: github.ref == 'refs/heads/main'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}