-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (63 loc) · 1.7 KB
/
Copy pathci.yml
File metadata and controls
76 lines (63 loc) · 1.7 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
id-token: write
pages: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*
package-manager-cache: false
- name: NPM install
run: npm install
- name: NPM build
run: |
npm run build
- name: NPM build for release
run: |
npm pack --pack-destination dist
rm -rf node_modules # remove it to prevent uploading it to GitHub Pages
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: "."
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
- name: Delete existing release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release delete v0.0.0 --yes || true
git push --delete origin v0.0.0 || true
git tag -d v0.0.0 || true
- name: Create new release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag v0.0.0
git push origin v0.0.0
gh release create v0.0.0 \
--title "v0.0.0" \
--notes "Development build from commit $(git rev-parse --short HEAD)" \
--prerelease \
dist/*