Skip to content

Commit 2675479

Browse files
authored
Create deploy.yml
1 parent 515d279 commit 2675479

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- github
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up JDK 11
17+
uses: actions/setup-java@v2
18+
with:
19+
distribution: 'adopt'
20+
java-version: '11'
21+
22+
- name: Build with Maven
23+
run: mvn clean install
24+
25+
- name: Deploy to GitHub Pages
26+
run: |
27+
mkdir -p out
28+
cp -r target/* out/
29+
cd out
30+
git init
31+
git config user.name "github-actions[bot]"
32+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
33+
git add .
34+
git commit -m "Deploy to GitHub Pages"
35+
git push --force "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" master:github

0 commit comments

Comments
 (0)