-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(deploy): job to deploy new api-gateway
- Loading branch information
Showing
3 changed files
with
17 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,11 +42,21 @@ jobs: | |
- name: Push image to DO Container Registry | ||
run: docker push registry.digitalocean.com/linkerry/base:latest | ||
- name: Build image for api-gateway | ||
env: | ||
NEXT_TELEMETRY_DISABLED: true | ||
NEXT_PUBLIC_API_HOST: https://api.linkerry.com | ||
run: docker build -t linkerry/api-gateway --build-arg NEXT_PUBLIC_API_HOST=$NEXT_PUBLIC_API_HOST -f ./apps/api-gateway/Dockerfile . --platform=linux/amd64 | ||
- name: Tag web image | ||
run: docker tag linkerry/api-gateway registry.digitalocean.com/linkerry/api-gateway:latest | ||
run: docker build -t registry.digitalocean.com/linkerry/api-gateway:latest -f ./apps/api-gateway/Dockerfile . --platform=linux/amd64 | ||
- name: Push image to DO Container Registry | ||
run: docker push registry.digitalocean.com/linkerry/api-gateway:latest | ||
- name: Connect to VPS and refresh docker compose | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.VPS_IP }} | ||
username: root | ||
key: ${{ secrets.SSH_PASSPHRASE_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.SSH_PASSPHRASE }} | ||
port: 22 | ||
script: | | ||
cd api.linkerry.com/ | ||
docker-compose pull | ||
docker compose up --force-recreate --build -d | ||
docker-compose up -d --no-deps --build api-gateway | ||
- name: Clear DO container registry | ||
run: doctl registry garbage-collection start |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,29 +19,3 @@ jobs: | |
echo "Connected to VPS" | ||
uptime | ||
touch test.txt | ||
# name: test-ssh | ||
|
||
# on: [push] | ||
|
||
# jobs: | ||
# test-job: | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Connect to DigitalOcean VPS and run commands | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${{ secrets.VPS_IP }} | ||
# username: root | ||
# key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
# # port: 22 | ||
# script: | | ||
# echo "Connected to VPS" | ||
# # Place your commands here | ||
# uptime | ||
# touch test.txt |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
`act --secret-file .github/workflows/.env -j test-job` |