Skip to content

Continuous Deployment #45

Continuous Deployment

Continuous Deployment #45

Workflow file for this run

name: Continuous Deployment
on:
push:
branches: ["main"]
workflow_dispatch:
env:
ENV_VARS: ${{ secrets.ENV_VARS }}
PROD_ENV_VARS: ${{ secrets.PROD_ENV_VARS }}
jobs:
build-prod:
runs-on: self-hosted
defaults:
run:
working-directory: ./prod
steps:
- uses: actions/checkout@v4
with:
path: "prod"
- uses: actions/setup-node@v4
with:
node-version: 20
- run: pnpm install
- name: Create .env
run: |
echo $ENV_VARS | base64 --decode > .env
echo $PROD_ENV_VARS | base64 --decode >> .env
- run: pm2 restart production.config.cjs