Skip to content

Commit

Permalink
ci: build and store docker image to github
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Jan 28, 2025
1 parent b1be30d commit eb9b16d
Showing 1 changed file with 13 additions and 25 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,19 @@ 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: [lint, cypress]
if: github.ref == 'refs/heads/develop'

- name: Deploy
uses: appleboy/[email protected]
permissions:
contents: read
packages: write
attestations: 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 }}

0 comments on commit eb9b16d

Please sign in to comment.