-
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.
Merge pull request #11 from renaism/develop
Develop
- Loading branch information
Showing
3 changed files
with
4 additions
and
44 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 |
---|---|---|
|
@@ -33,39 +33,4 @@ jobs: | |
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
deploy: | ||
name: Deploy Package | ||
runs-on: ubuntu-latest | ||
environment: production | ||
needs: build | ||
env: | ||
GITHUB_USERNAME: ${{ github.actor }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
API_KEY_SECRET: ${{ secrets.API_KEY_SECRET }} | ||
DB_HOST: ${{ secrets.DB_HOST }} | ||
DB_NAME: ${{ secrets.DB_NAME }} | ||
DB_USERNAME: ${{ secrets.DB_USERNAME }} | ||
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | ||
steps: | ||
- name: Deploy package to the remote server | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_VM1_HOST }} | ||
username: ${{ secrets.SSH_VM1_USERNAME }} | ||
key: ${{ secrets.SSH_VM1_KEY }} | ||
port: ${{ secrets.SSH_VM1_PORT }} | ||
envs: GITHUB_USERNAME, GITHUB_TOKEN, API_KEY_SECRET, DB_HOST, DB_NAME, DB_USERNAME, DB_PASSWORD | ||
script: | | ||
docker login ghcr.io -u $GITHUB_USERNAME -p $GITHUB_TOKEN | ||
docker pull ghcr.io/renaism/aeon-api:main | ||
docker image prune -f | ||
docker stop aeon-api | ||
docker rm -fv aeon-api | ||
docker run --name aeon-api -d -p 8080:8080 \ | ||
-e API_KEY_SECRET=$API_KEY_SECRET \ | ||
-e DB_HOST=$DB_HOST \ | ||
-e DB_NAME=$DB_NAME \ | ||
-e DB_USERNAME=$DB_USERNAME \ | ||
-e DB_PASSWORD=$DB_PASSWORD \ | ||
ghcr.io/renaism/aeon-api:main | ||
labels: ${{ steps.meta.outputs.labels }} |
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