diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 926dcd0d2..7dc2c2d34 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -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 @@ -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 diff --git a/stack.yml b/stack.yml index 5a0ae2978..dc42ddc6f 100644 --- a/stack.yml +++ b/stack.yml @@ -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: