start
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package com.auction.scraper;
|
||||
package com.auction;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.auction.scraper;
|
||||
package com.auction;
|
||||
|
||||
/*
|
||||
* TroostwijkScraper
|
||||
@@ -47,7 +47,6 @@ import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
42
src/main/java/com/auction/deploy.yml
Normal file
42
src/main/java/com/auction/deploy.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
|
||||
- name: Build
|
||||
run: mvn -B clean package
|
||||
|
||||
- name: Upload to JFrog
|
||||
run: |
|
||||
curl -u "${{ secrets.JFROG_USER }}:${{ secrets.JFROG_PASS }}" \
|
||||
-T target/*.jar \
|
||||
"http://JFROG-SERVER/artifactory/myrepo/app-latest.jar"
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Trigger remote deploy script
|
||||
uses: appleboy/ssh-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SERVER_IP }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||
script: |
|
||||
/opt/myapp/update.sh
|
||||
Reference in New Issue
Block a user