fix(workflow): properly added environment variables to deployment
All checks were successful
/ build (push) Successful in 2m40s
/ deploy (push) Successful in 1m48s

This commit is contained in:
devaine 2026-05-11 18:00:12 -05:00
commit 50256abceb
Signed by: devaine
GPG key ID: 954B1DCAC6FF84EE

View file

@ -17,7 +17,6 @@ jobs:
- name: Login to Forgejo Container Registry
uses: docker/login-action@v4
with:
# NOTE: Used for Forgejo Runner variables
registry: ${{ vars.REGISTRY_DOMAIN }}
username: ${{ vars.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
@ -49,8 +48,6 @@ jobs:
# ls -la
# echo "test"
# Will probably SSH into docker instance
#
deploy:
runs-on: docker
container:
@ -58,7 +55,6 @@ jobs:
steps:
- name: Prerequisite, install node & docker
run: |
# Get Prerequisite Packages
unset HISTFILE
apt update && apt install curl -y
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
@ -74,13 +70,6 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v6
- name: Write secrets in an .env file
run: |
echo ${{ secrets.API_PORT }} >> .env
echo ${{ secrets.FRONTEND_PORT }} >> .env
echo ${{ secrets.AI_API_KEY }} >> .env
- name: Setup remote connection and deploy container.
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
@ -98,6 +87,11 @@ jobs:
docker context create deploy --docker "host=ssh://deploy"
docker context use deploy
# Add secrets to the .env file
echo ${{ secrets.API_PORT }} >> .env
echo ${{ secrets.FRONTEND_PORT }} >> .env
echo ${{ secrets.AI_API_KEY }} >> .env
# Check to see if we have checked out the repo.
docker compose down
docker compose pull
@ -107,5 +101,5 @@ jobs:
run: |
docker context use default
docker context rm deploy
rm -rf ~/.ssh ~/.docker ~/.bash_history
rm -rf ~/.ssh ~/.docker ~/.bash_history .env