diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..aa8d6f9 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -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/FTP-Deploy-Action@v4.3.5 + with: + server: ftp.dashboard.amitraikwar.in + username: u392139545.github_deploy_dashwave + password: ${{ secrets.HOSTINGER_DASHWAVE_FTP_PASSWORD }} + local-dir: ./build/ + server-dir: ./ diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..082758d --- /dev/null +++ b/.github/workflows/main.yaml @@ -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 diff --git a/src/service/env.ts b/src/service/env.ts new file mode 100644 index 0000000..7969a97 --- /dev/null +++ b/src/service/env.ts @@ -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 }; diff --git a/src/service/supabase/supabase_main/Supabase.ts b/src/service/supabase/supabase_main/Supabase.ts index cc7ae0a..9e05b3e 100644 --- a/src/service/supabase/supabase_main/Supabase.ts +++ b/src/service/supabase/supabase_main/Supabase.ts @@ -5,7 +5,7 @@ import { PROJECTS_TABLE, SUPABASE_KEY, SUPABASE_URL, -} from '../../../env'; +} from '../../env'; // Supabase configuration const supabaseUrl = SUPABASE_URL;