blob: 9932105a04685d7570dcbc577a536866a073b4af (
plain)
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
|
name: Deploy to gh-pages
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm ci
- name: Build static files
run: npm run build
- name: Init repo in dist folder and commit static files
run: |
cd dist
git init
git add -A
git config --local user.email "ghactions@github.com"
git config --local user.name "GitHub Action"
git commit -m "deploy"
- name: Force push to gh-pages branch
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ./dist
|