-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (34 loc) · 971 Bytes
/
gh-pages.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
name: "gh-pages"
on:
push:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- run: npm ci
- run: npm run build
- run: npm run dist:jsdelivr
- run: git fetch origin gh-pages
- run: git switch gh-pages
- run: |
shopt -s extglob
rm -rf !(dist)
mv -f dist/* . && rm -rf dist
- run: ls -la
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: "git commit"
run: |
git add -A
git -c user.name=github-actions \
-c user.email=github-actions[bot]@users.noreply.github.com \
-c http.https://github.com/.extraheader= \
commit -m "✨ ${{ steps.get_version.outputs.VERSION }}"
- run: git push origin gh-pages