Skip to content

Commit b42a0c9

Browse files
committed
add workflow
1 parent 8e23b21 commit b42a0c9

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy to mvn.wesjd.net
2+
3+
on:
4+
push:
5+
branches:
6+
- deploy-mvn-wesjd-net
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout source repo
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Java
17+
uses: actions/setup-java@v3
18+
with:
19+
distribution: temurin
20+
java-version: 21
21+
22+
- name: Build and save artifacts
23+
run: |
24+
mkdir -p deploy-temp
25+
mvn clean deploy -DaltDeploymentRepository=local-repo::default::file://$PWD/deploy-temp
26+
27+
- name: Setup SSH
28+
uses: webfactory/[email protected]
29+
with:
30+
ssh-private-key: ${{ secrets.MVN_WESJD_NET_DEPLOY_KEY }}
31+
32+
- name: Checkout artifact repository
33+
uses: actions/checkout@v4
34+
with:
35+
repository: WesJD/mvn.wesjd.net
36+
path: mvn-wesjd-net
37+
ref: main
38+
39+
- name: Copy artifacts
40+
run: cp -R deploy-temp/* mvn-wesjd-net/
41+
42+
- name: Commit and push
43+
run: |
44+
cd mvn-wesjd-net
45+
git config user.name "github-actions[bot]"
46+
git config user.email "github-actions[bot]@users.noreply.github.com"
47+
git add .
48+
git commit -m "Add new build from $GITHUB_REPOSITORY@$GITHUB_SHA (run #${GITHUB_RUN_NUMBER})"
49+
git push
50+

0 commit comments

Comments
 (0)