-
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: build and store docker image to github
- Loading branch information
Showing
3 changed files
with
16 additions
and
27 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 |
---|---|---|
|
@@ -72,4 +72,5 @@ dist | |
.nuxt-storybook | ||
storybook-static | ||
|
||
.env | ||
.env | ||
.github |
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 |
---|---|---|
|
@@ -25,31 +25,18 @@ jobs: | |
- run: yarn lint | ||
- run: yarn build | ||
|
||
deploy_dev: | ||
needs: | ||
- build | ||
if: github.ref == 'refs/heads/develop' | ||
name: Deploy Dev | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎 | ||
uses: actions/checkout@v4 | ||
needs: [build] | ||
if: github.ref == 'refs/heads/develop' | ||
|
||
- name: Deploy | ||
uses: appleboy/[email protected] | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Docker Build and Push | ||
uses: cartoway/docker-compose-build-push-action@main | ||
with: | ||
host: ${{vars.DEPLOY_SSH_HOST}} | ||
username: ${{vars.DEPLOY_SSH_USERNAME}} | ||
key: ${{secrets.DEPLOY_SSH_KEY_DEV}} | ||
port: 2222 | ||
script: | | ||
echo -n 'Deployment started at: ' && | ||
date -u && | ||
cd ${{vars.DEPLOY_SSH_PATH}} && | ||
git fetch && | ||
git pull -f origin develop && | ||
cd .. && | ||
docker compose --profile "*" build frontend && | ||
docker compose up -d frontend && | ||
echo -n 'Deployment completed at: ' && | ||
date -u | ||
registry_password: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
services: | ||
frontend: | ||
restart: unless-stopped | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
args: | ||
NODE_VERSION: 20.13.1 | ||
ALPINE_VERSION: 3.19 | ||
image: ghcr.io/teritorio/clearance-frontend:develop | ||
environment: | ||
- NUXT_PUBLIC_API=${API} | ||
- NUXT_PUBLIC_SENTRY_DSN=${SENTRY_DSN} | ||
- NUXT_PUBLIC_SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT} | ||
ports: | ||
- 3000:3000 | ||
restart: unless-stopped |