Skip to content

Update .gitignore

Update .gitignore #75

Workflow file for this run

# .github/workflows/ci-cd.yml
name: server CI/CD Pipeline
on:
push:
paths:
- "server/**"
branches:
- main
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: '8.8'
- name: Build with Gradle
run: |
cd server
./gradlew build -x test
- name: Deliver jar File to Bastion Host
if: success()
uses: appleboy/scp-action@v0.1.5
with:
host: ${{ secrets.GCP_SERVER_VM_HOST }}
username: ${{ secrets.GCP_SERVER_VM_USER }}
key: ${{ secrets.GCP_SERVER_SSH_PRIVATE_KEY }}
port: 22
source: server/build/libs/swdc-0.0.1-SNAPSHOT.jar
target: /home/patturning2/deployment/
- name: Deliver jar File to Internal Server through Bastion Host
run: |
ssh -i <(echo "${{ secrets.GCP_SERVER_SSH_PRIVATE_KEY }}") -o StrictHostKeyChecking=no patturning2@${{ secrets.GCP_SERVER_VM_HOST }} \
"scp -i <(echo '${{ secrets.GCP_INTERNAL_SERVER_SSH_PRIVATE_KEY }}') /home/patturning2/deployment/swdc-0.0.1-SNAPSHOT.jar patturning2@${{ secrets.GCP_INTERNAL_SERVER_VM_HOST }}:/home/patturning2/server/Dark-Pattern-Detection-SWDeveloperContest/deployment/"
- name: Deploy to Internal Server through Bastion Host
if: success()
run: |
ssh -o StrictHostKeyChecking=no \
-i <(echo "${{ secrets.GCP_SERVER_SSH_PRIVATE_KEY }}") \
-o ProxyCommand="ssh -W %h:%p -o StrictHostKeyChecking=no -i <(echo '${{ secrets.GCP_SERVER_SSH_PRIVATE_KEY }}') ${{ secrets.GCP_SERVER_VM_USER }}@${{ secrets.GCP_SERVER_VM_HOST }}" \
${{ secrets.GCP_INTERNAL_SERVER_USER }}@${{ secrets.GCP_INTERNAL_SERVER_VM_HOST }} << EOF
sudo docker image prune -f
sudo docker stop swdc-container || true
sudo docker rm swdc-container || true
cd /home/patturning2/server/Dark-Pattern-Detection-SWDeveloperContest/deployment
sudo docker build -t swdc-app .
sudo docker run -d -p 8080:8080 --name swdc-container -v /mnt:/mnt swdc-app