-
Notifications
You must be signed in to change notification settings - Fork 35
58 lines (50 loc) · 1.39 KB
/
publish.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: GitHub Pages
on:
push:
tags:
- '*.*.*'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Use Node 18.x
uses: actions/setup-node@v1
with:
node-version: 18.18.2
- name: set env
run: |
export NODE_OPTIONS=--openssl-legacy-provider
- name: install dependency
run: npm install
- name: Run Build
run: |
npm run build
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build # Replace "dist" with the output directory of your build
release:
needs: deploy
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false