Skip to content

Commit 2fae9ea

Browse files
committed
add actions/cache
1 parent 033fc42 commit 2fae9ea

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ jobs:
2525
steps:
2626
# Checkout source code
2727
- uses: actions/checkout@v2
28+
# Cache maven .m2 directory
29+
- uses: actions/cache@v2
30+
with:
31+
path: ~/.m2/repository
32+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
33+
restore-keys: |
34+
${{ runner.os }}-maven-
2835
# Install Java 1.8
2936
- uses: actions/setup-java@v1
3037
with:
3138
server-id: hengyu
3239
java-version: 1.8
33-
server-username: MAVEN_USERNAME
34-
server-password: MAVEN_PASSWORD
3540
# Publish to Apache Maven Central
3641
- run: mvn clean compile
37-
env:
38-
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTER_USER_NAME }}
39-
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTER_PASSWORD }}

0 commit comments

Comments
 (0)