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 58f5c6b commit a4574f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 36 deletions.
48 changes: 12 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,42 +97,18 @@ jobs:
name: cypress-screenshots
path: cypress/screenshots

deploy_dev:
needs:
- install_cache
- lint
- cypress
docker:
runs-on: ubuntu-latest
needs: [lint, cypress]
if: github.ref == 'refs/heads/develop'
name: Deploy Dev
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
node:
- 20
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- run: corepack enable

- 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: ${{secrets.DEPLOY_SSH_HOST}}
username: ${{secrets.DEPLOY_SSH_USERNAME}}
key: ${{secrets.DEPLOY_SSH_KEY_DEV}}
port: 2222
script: |
echo -n 'VIDO: Deployment started at: ' &&
date -u &&
cd ${{secrets.DEPLOY_SSH_PATH}} &&
git fetch &&
git checkout -f origin/develop &&
ruby poi_explode.rb cypress/fixtures/teritorio/references/pois.geojson &&
docker compose build &&
touch vidos-config.json &&
docker compose run --rm vido yarn build-config &&
docker compose up -d &&
echo -n 'VIDO: Deployment completed at: ' &&
date -u
registry_password: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
context: .
args:
NODE_VERSION: 20-alpine3.18
image: ghcr.io/teritorio/vido:develop
restart: unless-stopped
ports:
- '3000:3000'
Expand Down

0 comments on commit a4574f2

Please sign in to comment.