Skip to content

Commit c020717

Browse files
authored
auto update site
1 parent 77fc027 commit c020717

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Auto publish
2+
3+
on:
4+
push:
5+
branches: [ source ]
6+
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
path: source
15+
16+
- name: Set up Ruby 2.4.1
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 2.4.1
20+
21+
- name: build
22+
run: |
23+
cd $GITHUB_WORKSPACE/source/
24+
make setup
25+
make build
26+
27+
- uses: actions/checkout@v2
28+
with:
29+
ref: master
30+
path: master
31+
32+
- run: |
33+
cd $GITHUB_WORKSPACE/master/
34+
git rm -rf .
35+
cp -Rf $GITHUB_WORKSPACE/source/_site/. .
36+
ls
37+
git config --global user.email "action@github.com"
38+
git config --global user.name "github-action"
39+
git add .
40+
git status
41+
git commit -m "Latest site on successful build auto-pushed to master"
42+
git push

0 commit comments

Comments
 (0)