Skip to content

disable websockets

disable websockets #8

Workflow file for this run

name: 🚀 Deploy
on:
push:
branches:
- main
- dev
pull_request: {}
permissions:
actions: write
contents: read
jobs:
# lint:
# name: ⬣ ESLint
# runs-on: ubuntu-latest
# steps:
# - name: 🛑 Cancel Previous Runs
# uses: styfle/[email protected]
# - name: ⬇️ Checkout repo
# uses: actions/checkout@v3
# # - name: Setup Bun
# # uses: oven-sh/setup-bun@v1
# # - name: Install dependencies
# # run: npm install
# - name: ⎔ Setup node
# uses: actions/setup-node@v3
# with:
# node-version: 20
# - name: 📥 Download deps
# uses: bahmutov/npm-install@v1
# - name: Install dependencies
# run: npm install
# - name: 🔬 Lint
# run: npm run lint
# build:
# name: 🐳 build
# uses: ./.github/workflows/build.yml
# secrets: inherit
deploy:
name: 🚀 Deploy
runs-on: [self-hosted]
# needs: [build]
# only build/deploy main branch on pushes
if: ${{ (github.ref == 'refs/heads/main') && github.event_name == 'push' }}
env:
JWT_SECRET: ${{ secrets.JWT_SECRET }}
STRAPI_TOKEN: ${{ secrets.STRAPI_TOKEN }}
STRAPI_URL: ${{ secrets.STRAPI_URL }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🚀 Run Docker Compose on Production
if: ${{ github.ref == 'refs/heads/main' }}
run: |
touch .env
echo "STRAPI_URL=${{ secrets.STRAPI_URL }}" >> .env
echo "DATABASE_CLIENT=${{ secrets.DATABASE_CLIENT }}" >> .env
echo "DATABASE_HOST=strapiDB" >> .env
echo "DATABASE_PORT=${{ secrets.DATABASE_PORT }}" >> .env
echo "DATABASE_NAME=${{ secrets.DATABASE_NAME }}" >> .env
echo "DATABASE_USERNAME=${{ secrets.DATABASE_USERNAME }}" >> .env
echo "DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }}" >> .env
echo "JWT_SECRET=${{ secrets.JWT_SECRET }}" >> .env
echo "ADMIN_JWT_SECRET=${{ secrets.ADMIN_JWT_SECRET }}" >> .env
echo "APP_KEYS=${{ secrets.APP_KEYS }}" >> .env
echo "NODE_ENV=${{ secrets.NODE_ENV }}" >> .env
echo "STRAPI_TOKEN=${{ secrets.STRAPI_TOKEN }}" >> .env
echo "MAILGUN_API_KEY=${{ secrets.MAILGUN_API_KEY }}" >> .env
echo "MAILGUN_DOMAIN=${{ secrets.MAILGUN_DOMAIN }}" >> .env
echo "MAILGUN_URL=${{ secrets.MAILGUN_URL }}" >> .env
echo "STRIPE_SECRET_KEY=${{ secrets.STRIPE_SECRET_KEY }}" >> .env
echo "STRIPE_PUBLISHABLE_KEY=${{ secrets.STRIPE_PUBLISHABLE_KEY }}" >> .env
echo "FRONTEND_URL=${{ secrets.FRONTEND_URL }}" >> .env
echo "STRIPE_WEBHOOK_SECRET_KEY=${{ secrets.STRIPE_WEBHOOK_SECRET_KEY }}" >> .env
echo "API_TOKEN_SALT=${{ secrets.API_TOKEN_SALT }}" >> .env
echo "TRANSFER_TOKEN_SALT=${{ secrets.TRANSFER_TOKEN_SALT }}" >> .env
docker compose -f docker-compose.prod.yml up --build -d
docker system prune --all --volumes --force