Skip to content

Commit

Permalink
ci: not deploy with github actions and change .env file
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasevano committed Jun 12, 2024
1 parent 82e5b6f commit f54b7b9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,20 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

deploy:
name: Deploy on server
runs-on: ubuntu-latest
needs: [publish-api, publish-front]

steps:
- name: Deploy on server
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
docker compose pull
docker compose down
docker compose up -d
# deploy:
# name: Deploy on server
# runs-on: ubuntu-latest
# needs: [publish-api, publish-front]

# steps:
# - name: Deploy on server
# uses: appleboy/[email protected]
# with:
# host: ${{ secrets.SSH_HOST }}
# username: ${{ secrets.SSH_USERNAME }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# port: ${{ secrets.SSH_PORT }}
# script: |
# docker compose pull
# docker compose down
# docker compose up -d
2 changes: 1 addition & 1 deletion api/src/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {
func main() {
app := fiber.New()
micro := fiber.New()
config, _ := initializers.LoadConfig(".")
// config, _ := initializers.LoadConfig(".")
frontUrl := viper.GetString("FRONT_URL")
frontPort := viper.GetString("FRONT_PORT")

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ services:
front:
container_name: front
image: ghcr.io/thomasevano/easydocker/front:latest
volumes:
- ./.env:/app/.env
ports:
- "${FRONT_PORT}:80"

Expand Down

0 comments on commit f54b7b9

Please sign in to comment.