Skip to content

Commit

Permalink
fix evn now
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Sep 20, 2024
1 parent 3abb03d commit 4f3d344
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ jobs:
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

- name: Env setup
run: echo ${{ secrets.API_PORT }}

deploy:
needs: build
runs-on: ubuntu-latest
Expand All @@ -58,26 +55,23 @@ jobs:
USE_PRIVATE: ${{secrets.USE_PRIVATE}}
PRIVATE_API_ADDR: ${{secrets.PRIVATE_API_ADDR}}
PRIVATE_API_AUTH: ${{secrets.PRIVATE_API_AUTH}}
HIVESIGNER_CLIENT_SECRET: ${{secrets.HIVESIGNER_SECRET}}
HIVESIGNER_SECRET: ${{secrets.HIVESIGNER_SECRET}}
SEARCH_API_ADDR: ${{secrets.SEARCH_API_ADDR}}
SEARCH_API_SECRET: ${{secrets.SEARCH_API_SECRET}}
API_PORT: ${{secrets.API_PORT}}
with:
host: ${{ secrets.SSH_STAGING_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
envs: USE_PRIVATE,PRIVATE_API_ADDR,PRIVATE_API_AUTH,HIVESIGNER_CLIENT_SECRET,SEARCH_API_ADDR,SEARCH_API_SECRET,API_PORT
envs: USE_PRIVATE,PRIVATE_API_ADDR,PRIVATE_API_AUTH,HIVESIGNER_SECRET,SEARCH_API_ADDR,SEARCH_API_SECRET
script: |
# Create an .env file for Docker stack
echo "NEXT_PUBLIC_USE_PRIVATE=$USE_PRIVATE" > .env
echo "PRIVATE_API_ADDR=$PRIVATE_API_ADDR" >> .env
echo "PRIVATE_API_AUTH=$PRIVATE_API_AUTH" >> .env
echo "NEXT_PUBLIC_HS_CLIENT_SECRET=$HIVESIGNER_CLIENT_SECRET" >> .env
echo "SEARCH_API_ADDR=$SEARCH_API_ADDR" >> .env
echo "SEARCH_API_SECRET=$SEARCH_API_SECRET" >> .env
echo "API_PORT=$API_PORT" >> .env
export NEXT_PUBLIC_USE_PRIVATE=$USE_PRIVATE
export PRIVATE_API_ADDR=$PRIVATE_API_ADDR
export PRIVATE_API_AUTH=$PRIVATE_API_AUTH
export NEXT_PUBLIC_HS_CLIENT_SECRET=HIVESIGNER_SECRET
export SEARCH_API_ADDR=$SEARCH_API_ADDR
export SEARCH_API_SECRET=$SEARCH_API_SECRET
cd ~/vision-next
git pull origin develop
docker pull ecency/vision-next:develop
docker stack deploy -c stack.yml --env-file .env vision
docker stack deploy -c stack.yml vision
2 changes: 1 addition & 1 deletion stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
environment:
- PRIVATE_API_ADDR=${PRIVATE_API_ADDR}
- PRIVATE_API_AUTH=${PRIVATE_API_AUTH}
- HIVESIGNER_SECRET=${NEXT_PUBLIC_HIVESIGNER_SECRET}
- HIVESIGNER_SECRET=${NEXT_PUBLIC_HS_CLIENT_SECRET}
- SEARCH_API_ADDR=${SEARCH_API_ADDR}
- SEARCH_API_SECRET=${SEARCH_API_SECRET}
deploy:
Expand Down

0 comments on commit 4f3d344

Please sign in to comment.