Skip to content

Commit

Permalink
Merge pull request #50 from eksqtr/development
Browse files Browse the repository at this point in the history
Attempt to fix empty env variables value upon deployment and added de…
  • Loading branch information
eksqtr authored Aug 27, 2024
2 parents 41a8b8f + 6769776 commit 758033e
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ jobs:
run: npm ci

- name: Build the project for production environment
env:
APP_URL: ${{ vars.APP_URL }}
APP_TITLE: ${{ vars.APP_TITLE }}
APP_AUTHOR: ${{ vars.APP_AUTHOR }}
APP_DESCRIPTION: ${{ vars.APP_DESCRIPTION }}
APP_IMAGE_URL: ${{ vars.APP_IMAGE_URL }}
APP_METADATA_KEYWORDS: ${{ vars.APP_METADATA_KEYWORDS }}
APP_METADATA_OPENGRAPH_SITENAME: ${{ vars.APP_METADATA_OPENGRAPH_SITENAME }}
run: npm run build

- name: Configuring Directory Permissions of the server
Expand Down Expand Up @@ -79,13 +71,12 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
VM_USERNAME: ${{ secrets.VM_USERNAME }}
VM_IP: ${{ secrets.VM_IP }}
APP_URL: ${{ vars.APP_URL }}
APP_TITLE: ${{ vars.APP_TITLE }}
APP_AUTHOR: ${{ vars.APP_AUTHOR }}
APP_DESCRIPTION: ${{ vars.APP_DESCRIPTION }}
APP_IMAGE_URL: ${{ vars.APP_IMAGE_URL }}
APP_METADATA_KEYWORDS: ${{ vars.APP_METADATA_KEYWORDS }}
APP_METADATA_OPENGRAPH_SITENAME: ${{ vars.APP_METADATA_OPENGRAPH_SITENAME }}
APP_URL: ${{ env.APP_URL }}
APP_TITLE: ${{ env.APP_TITLE }}
APP_AUTHOR: ${{ env.APP_AUTHOR }}
APP_DESCRIPTION: ${{ env.APP_DESCRIPTION }}
APP_METADATA_KEYWORDS: ${{ env.APP_METADATA_KEYWORDS }}
APP_METADATA_OPENGRAPH_SITENAME: ${{ env.APP_METADATA_OPENGRAPH_SITENAME }}
run: |
echo "$SSH_PRIVATE_KEY" > key.pem
chmod 600 key.pem
Expand All @@ -95,11 +86,19 @@ jobs:
echo "APP_TITLE=$APP_TITLE" >> /var/www/website-portfolio/.env
echo "APP_AUTHOR=$APP_AUTHOR" >> /var/www/website-portfolio/.env
echo "APP_DESCRIPTION=$APP_DESCRIPTION" >> /var/www/website-portfolio/.env
echo "APP_IMAGE_URL=$APP_IMAGE_URL" >> /var/www/website-portfolio/.env
echo "APP_METADATA_KEYWORDS=$APP_METADATA_KEYWORDS" >> /var/www/website-portfolio/.env
echo "APP_METADATA_OPENGRAPH_SITENAME=$APP_METADATA_OPENGRAPH_SITENAME" >> /var/www/website-portfolio/.env
EOF
- name: Print environment variables (Debugging)
run: |
echo "APP_URL: ${{ env.APP_URL }}"
echo "APP_TITLE: ${{ env.APP_TITLE }}"
echo "APP_AUTHOR: ${{ env.APP_AUTHOR }}"
echo "APP_DESCRIPTION: ${{ env.APP_DESCRIPTION }}"
echo "APP_METADATA_KEYWORDS: ${{ env.APP_METADATA_KEYWORDS }}"
echo "APP_METADATA_OPENGRAPH_SITENAME: ${{ env.APP_METADATA_OPENGRAPH_SITENAME }}"
- name: Configure and Start application
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
Expand Down

0 comments on commit 758033e

Please sign in to comment.