-
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(actions): all acions can deploy app
- Loading branch information
Showing
5 changed files
with
4,511 additions
and
7 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
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: build-and-deploy-app | |
on: workflow_dispatch | ||
|
||
jobs: | ||
build_and_deploy: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Build images | ||
steps: | ||
|
@@ -52,6 +52,12 @@ jobs: | |
run: docker build -t registry.digitalocean.com/linkerry/web:latest --build-arg NEXT_PUBLIC_API_HOST=$NEXT_PUBLIC_API_HOST -f ./apps/web/Dockerfile . --platform=linux/amd64 | ||
- name: Push image to DO Container Registry | ||
run: docker push registry.digitalocean.com/linkerry/web:latest | ||
- name: Clear DO container registry | ||
run: doctl registry garbage-collection start --force --registry-name linkerry | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Deploy apps | ||
steps: | ||
- name: Connect to VPS and refresh docker composes | ||
uses: appleboy/[email protected] | ||
with: | ||
|
@@ -69,5 +75,3 @@ jobs: | |
docker compose pull | ||
docker compose up -d --no-deps --build web | ||
docker image prune -f | ||
- 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: build-and-deploy-web | |
on: workflow_dispatch | ||
|
||
jobs: | ||
build_and_deploy: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Build images | ||
steps: | ||
|
@@ -51,6 +51,12 @@ jobs: | |
run: docker tag linkerry/web registry.digitalocean.com/linkerry/web:latest | ||
- name: Push image to DO Container Registry | ||
run: docker push registry.digitalocean.com/linkerry/web:latest | ||
- name: Clear DO container registry | ||
run: doctl registry garbage-collection start --force --registry-name linkerry | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Deploy web | ||
steps: | ||
- name: Connect to VPS and refresh docker compose | ||
uses: appleboy/[email protected] | ||
with: | ||
|
@@ -64,5 +70,3 @@ jobs: | |
docker compose pull | ||
docker compose up -d --no-deps --build web | ||
docker image prune -f | ||
- 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
`node --env-file=.env -r ts-node/register tools/devops/digital-ocean-firewall.ts` |
Oops, something went wrong.