Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Job]: Adding built, lint, test, and deployment job (#26) #27

Merged
merged 1 commit into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy website on production

on:
push:
branches: ['production']

jobs:
setup_and_deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn build --if-present
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: ftp.dashboard.amitraikwar.in
username: u392139545.github_deploy_dashwave
password: ${{ secrets.HOSTINGER_DASHWAVE_FTP_PASSWORD }}
local-dir: ./build/
server-dir: ./
26 changes: 26 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
push:
branches: ['development']
pull_request:
branches: ['development']

jobs:
build_test_lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn build --if-present
- name: Linting
run: yarn lint:staged
- name: Test
run: yarn test
11 changes: 11 additions & 0 deletions src/service/env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Supabase constants:
const SUPABASE_URL = 'https://derclltpzfohoecoxvge.supabase.co';
const SUPABASE_KEY =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRlcmNsbHRwemZvaG9lY294dmdlIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDY0NDU2NjIsImV4cCI6MjAyMjAyMTY2Mn0.EDVPLpVX82RLxYlSv7ekIxcuXAP_fmEkzhOh67oXECk';

// Data base table names
const USER_PROFILE_TABLE = 'dashwave_users';
const PROJECTS_TABLE = 'dashwave_projects';

// Export the constants
export { SUPABASE_URL, SUPABASE_KEY, USER_PROFILE_TABLE, PROJECTS_TABLE };
2 changes: 1 addition & 1 deletion src/service/supabase/supabase_main/Supabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
PROJECTS_TABLE,
SUPABASE_KEY,
SUPABASE_URL,
} from '../../../env';
} from '../../env';

// Supabase configuration
const supabaseUrl = SUPABASE_URL;
Expand Down
Loading