Skip to content

Commit 3570d20

Browse files
authored
Deploy to mvn.wesjd.net (#391)
This PR switches the build and deployment to GH actions and GH pages. A GH actions workflow builds the project in this repo and uploads the files to `mvn.wesjd.net`. A GH action on `mvn.wesjd.net` deploys the contents. While we no longer have a dependency on CodeMC for build and distribution, we still use their NMS repo. In the future, we may need to have a more creative way to depend on the NMS code in the modules. Closes #389
1 parent 8e23b21 commit 3570d20

File tree

4 files changed

+75
-15
lines changed

4 files changed

+75
-15
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.github/workflows/* @WesJD

.github/workflows/deploy.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy to mvn.wesjd.net
2+
3+
on:
4+
push:
5+
branches:
6+
- master
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 -B -DaltDeploymentRepository=local-repo::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+
ssh-key: ${{ secrets.MVN_WESJD_NET_DEPLOY_KEY }}
39+
40+
- name: Copy artifacts
41+
run: cp -R deploy-temp/* mvn-wesjd-net/
42+
43+
- name: Commit and push
44+
run: |
45+
cd mvn-wesjd-net
46+
git remote set-url origin [email protected]:WesJD/mvn.wesjd.net.git
47+
git config user.name "github-actions[bot]"
48+
git config user.email "github-actions[bot]@users.noreply.github.com"
49+
git add .
50+
git commit -m "Add new build from $GITHUB_REPOSITORY@$GITHUB_SHA (run #${GITHUB_RUN_NUMBER})"
51+
git push
52+

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
# AnvilGUI [![Build Status](https://ci.codemc.io/job/WesJD/job/AnvilGUI/badge/icon)](https://ci.codemc.io/job/WesJD/job/AnvilGUI/)
1+
> [!NOTE]
2+
> The Maven repository for AnvilGUI has moved as of version `1.10.11-SNAPSHOT`.
3+
>
4+
> Please replace...
5+
> ```xml
6+
> <repository>
7+
> <id>codemc-snapshots</id>
8+
> <url>https://repo.codemc.io/repository/maven-snapshots/</url>
9+
> </repository>
10+
> ```
11+
>
12+
> with...
13+
> ```xml
14+
> <repository>
15+
> <id>mvn-wesjd-net</id>
16+
> <url>https://mvn.wesjd.net/</url>
17+
> </repository>
18+
> ```
19+
20+
# AnvilGUI
221
AnvilGUI is a library to capture user input in Minecraft through an anvil inventory. Anvil inventories within the realm
322
of the Minecraft / Bukkit / Spigot / Paper API are extremely finnicky and ultimately don't support the ability to use them fully for
423
the task of user input. As a result, the only way to achieve user input with an anvil inventory requires interaction with obfuscated,
@@ -38,8 +57,8 @@ AnvilGUI requires the usage of Maven or a Maven compatible build system.
3857
</dependency>
3958
4059
<repository>
41-
<id>codemc-snapshots</id>
42-
<url>https://repo.codemc.io/repository/maven-snapshots/</url>
60+
<id>mvn-wesjd-net</id>
61+
<url>https://mvn.wesjd.net/</url>
4362
</repository>
4463
```
4564

pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,4 @@
127127
</plugins>
128128
</pluginManagement>
129129
</build>
130-
131-
<distributionManagement>
132-
<repository>
133-
<id>codemc-releases</id>
134-
<url>https://repo.codemc.io/repository/maven-releases/</url>
135-
</repository>
136-
<snapshotRepository>
137-
<id>codemc-snapshots</id>
138-
<url>https://repo.codemc.io/repository/maven-snapshots/</url>
139-
</snapshotRepository>
140-
</distributionManagement>
141-
142130
</project>

0 commit comments

Comments
 (0)