-
-
Notifications
You must be signed in to change notification settings - Fork 16
45 lines (39 loc) · 1.13 KB
/
publish-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
37
38
39
40
41
42
43
44
45
# This workflow will publish dist to gh-pages on every push to master branch
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Build
on:
push:
branches:
- master
jobs:
gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- name: Build and Lint
run: |
npm ci
npm run lint
- name: Recreating gh-pages
run: |
cd examples/vue
npm ci
npm run build
cd dist
cp -r ../../../.git .
git config --local user.email "[email protected]"
git config --local user.name "dipu-bd"
git branch -D gh-pages || true
git checkout -b gh-pages
git add --all
git commit -m "[GHA] Update gh-pages"
- name: Publish changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: examples/vue/dist