-
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.
- Loading branch information
1 parent
8be046a
commit ecdc20e
Showing
1 changed file
with
15 additions
and
20 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 |
---|---|---|
|
@@ -13,6 +13,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Login to DigitalOcean Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: registry.digitalocean.com | ||
username: ${{ secrets.DIGITALOCEAN_USERNAME }} | ||
password: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download BlazeFace | ||
|
@@ -22,23 +28,12 @@ jobs: | |
path: 'model/blazeface' | ||
|
||
- name: Build the Docker image | ||
run: docker build . --file build/Dockerfile --tag the-smile:$(date +%Y%m%d-%s) --tag the-smile:latest | ||
|
||
# - name: Tar the image | ||
# run: docker save the-smile:latest | gzip > smile_latest.tar.gz | ||
|
||
- name: copy image to server | ||
run: ssh -i <(echo $key) $user@$host ls -la | ||
env: | ||
host: ${{ secrets.SSH_HOST }} | ||
user: ${{ secrets.SSH_USER }} | ||
key: ${{ secrets.SSH_KEY }} | ||
# - name: copy file via ssh key | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${{ secrets.SSH_HOST }} | ||
# username: ${{ secrets.SSH_USER }} | ||
# port: 22 | ||
# key: ${{ secrets.SSH_KEY }} | ||
# source: "smile_latest.tar.gz" | ||
# target: /srv/smile/smile_latest.tar.gz | ||
run: docker build . --file build/Dockerfile --tag thesmile:$(date +%Y%m%d-%s) --tag thesmile:latest | ||
|
||
- name: Tag for DO | ||
run: docker image tag thesmile:latest registry.digitalocean.com/thesmile/thesmile:latest | ||
|
||
- name: Push to DO | ||
run: docker image tag thesmile:latest registry.digitalocean.com/thesmile/thesmile:latest | ||
|
||
|