-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.07 KB
/
build.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
name: build
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: run
run: |
cp -r docs ../docs
mvn org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly
java -jar target/webhome-1.0-SNAPSHOT-jar-with-dependencies.jar json=src/main/resources/in.json out=../index.html
mkdir -p ~/.ssh/
echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
# set git infomation
git config --global user.name 'mikusugar'
git config --global user.email '[email protected]'
# push
git checkout -b web
cp -r ../docs docs
cp ../index.html docs/cn/index.html
cp ../index.html docs/en/index.html
git add docs/*
git commit -m "update: web"
git push -f origin web