You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to use dotenv-vault in my Sveltekit app that uses Bun for a few days now. The app is deployed to Digital Ocean using a GitHub workflow. I need to access the .env file in the workflow because I can't build the app without it but I can't seem to get it to work.
Steps to reproduce:
Create a Sveltekit app using bun that uses env variables,
Store the env variables in dotenv-vault,
try to deploy the app using a GitHub workflow
Workflow File:
name: Build and Deploy SvelteKit App
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest # Use the latest stable Bun release
- name: Install dependencies
run: bun install
- name: Build the project
env:
DOTENV_KEY: ${{ secrets.DOTENV_KEY }}
run: bun run build
- uses: actions/upload-artifact@v3
with:
name: build
path: build
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: build
path: build
- name: Deploy to DigitalOcean Droplet
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd /home/deployer/Take-the-Cake-Website
rm -rf build # Clean up old build to avoid conflicts
scp -r build/* ${{ secrets.USERNAME }}@${{ secrets.HOST }}:/home/deployer/Take-the-Cake-Website
pm2 reload Take-the-Cake-Website
echo 'Deployment to Digital Ocean finished'
What I have tried:
I have tried modifying the package.json file to incorporate the suggestions from the docs about using dotenv-vault with sveltekit but bun does not have a -r option and the bun require command doesn't work as a replacement.
I have used the decrypt command to validate that everything is working and it does print the env variables in the workflow.
Using the pull command doesn't work since it requires you to login using the website.
Thanks for reading and let me know if you need any more information.
The text was updated successfully, but these errors were encountered:
Overview:
I have been trying to use dotenv-vault in my Sveltekit app that uses Bun for a few days now. The app is deployed to Digital Ocean using a GitHub workflow. I need to access the .env file in the workflow because I can't build the app without it but I can't seem to get it to work.
Steps to reproduce:
Workflow File:
What I have tried:
Thanks for reading and let me know if you need any more information.
The text was updated successfully, but these errors were encountered: