fix: google oauth login (#15) #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to NCP | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 21 | |
distribution: temurin | |
- name: Build core-api jar | |
run: ./gradlew :noweekend-core:core-api:clean :noweekend-core:core-api:bootJar | |
- name: Build core-api Docker image | |
run: docker build -t core-api:latest -f ./noweekend-core/core-api/Dockerfile ./noweekend-core/core-api | |
- name: Save Docker images as tar | |
run: | | |
docker save core-api:latest -o core-api.tar | |
sleep 2 | |
- name: Fix permissions for all artifacts | |
run: chmod 644 core-api.tar docker-compose.app.yml | |
- name: Zip up deploy artifacts | |
run: zip deploy-artifacts.zip core-api.tar docker-compose.app.yml | |
- name: SCP zipped artifacts to NCP | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.NCP_SERVER_HOST }} | |
username: root | |
key: ${{ secrets.NCP_SSH_KEY }} | |
source: deploy-artifacts.zip | |
target: /root/organized/app/ | |
debug: true | |
- name: SSH into server and deploy | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.NCP_SERVER_HOST }} | |
username: root | |
key: ${{ secrets.NCP_SSH_KEY }} | |
script: | | |
cd /root/organized/app | |
rm -f core-api.tar docker-compose.app.yml | |
unzip -o deploy-artifacts.zip | |
rm -f deploy-artifacts.zip | |
docker load -i core-api.tar | |
docker compose -f docker-compose.app.yml up -d |