Files
portal/.github/workflows/deploy.yml
T
NeilClack 6e50941030 Update the action workflow to utilize secrets
Instead of managing a .env file on the server, I have begun the migration to Github secrets.
This is a tes tto see if I can pass in the Google OAuth client secret.
If so, then I can migrate the rest of the environment variables and manage them in one easy place..

I should still keep a record of these somewhere, encrypted, hidden, and safe.
2026-01-30 23:33:36 -06:00

30 lines
760 B
YAML

# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Build image
run: podman build -t portal:latest .
- name: Stop old container
run: podman stop portal || true && podman rm portal || true
- name: Start new container
run: |
podman run -d --name portal \
--replace \
--restart=always \
--network=host \
-v /mnt/volume_nyc3_01/portal/.env:/app/.env:ro \
-v /etc/ssl/certs/Digital_Ocean.crt:/etc/ssl/certs/Digital_Ocean.crt:ro \
-e GOOGLE_CLIENT_SECRET=${{ secrets.oauth_google_secret }} \
portal:latest