diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 27311df..5cf1e79 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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 @@ -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 }}