remove unsed variable accross the project #536
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Status | |
on: | |
push: | |
branches: ['dev'] | |
pull_request: | |
branches: ['dev'] | |
env: | |
KEYCLOAK_CLIENT_ID: ${{secrets.KEYCLOAK_CLIENT_ID}} | |
KEYCLOAK_CLIENT_SECRET: ${{secrets.KEYCLOAK_CLIENT_SECRET}} | |
AUTH_ISSUER: ${{secrets.AUTH_ISSUER}} | |
NEXTAUTH_URL: 'https://dev.civicdataspace.in/' | |
NEXT_PUBLIC_NEXTAUTH_URL: 'https://dev.civicdataspace.in/' | |
NEXTAUTH_SECRET: ${{secrets.NEXTAUTH_SECRET}} | |
END_SESSION_URL: ${{secrets.END_SESSION_URL}} | |
REFRESH_TOKEN_URL: ${{secrets.REFRESH_TOKEN_URL}} | |
NEXT_PUBLIC_BACKEND_URL: ${{secrets.NEXT_PUBLIC_BACKEND_URL_DEV_DS}} | |
BACKEND_GRAPHQL_URL: ${{secrets.BACKEND_GRAPHQL_URL_DEV_DS}} | |
NEXT_PUBLIC_ENABLE_ACCESSMODEL: ${{secrets.NEXT_PUBLIC_ENABLE_ACCESSMODEL_DS}} | |
NEXT_PUBLIC_BACKEND_GRAPHQL_URL: ${{secrets.NEXT_PUBLIC_BACKEND_GRAPHQL_URL_DEV_DS}} | |
BACKEND_URL: ${{secrets.BACKEND_URL_DEV}} | |
NEXT_PUBLIC_PLATFORM_URL: ${{secrets.NEXT_PUBLIC_PLATFORM_URL_DEV}} | |
NEXT_PUBLIC_ANALYTICS_URL: ${{secrets.NEXT_PUBLIC_ANALYTICS_URL}} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci --force | |
- name: Generate GraphQL types (CI-safe) | |
run: | | |
# Ensure generated directory exists | |
mkdir -p ./gql/generated | |
# Try to generate with timeout and fallback | |
timeout 60s npm run generate:ci || { | |
echo "GraphQL codegen failed or timed out, checking for existing files..." | |
if [ -d "./gql/generated" ] && [ "$(ls -A ./gql/generated 2>/dev/null)" ]; then | |
echo "Using existing generated files" | |
else | |
echo "Creating minimal generated files for build to proceed" | |
echo "// Auto-generated fallback file for CI builds" > ./gql/generated/index.ts | |
echo "export type Maybe<T> = T | null;" >> ./gql/generated/index.ts | |
echo "export type Scalars = {" >> ./gql/generated/index.ts | |
echo " ID: string;" >> ./gql/generated/index.ts | |
echo " String: string;" >> ./gql/generated/index.ts | |
echo " Boolean: boolean;" >> ./gql/generated/index.ts | |
echo " Int: number;" >> ./gql/generated/index.ts | |
echo " Float: number;" >> ./gql/generated/index.ts | |
echo "};" >> ./gql/generated/index.ts | |
echo "export {};" >> ./gql/generated/index.ts | |
echo "Created fallback generated files" | |
fi | |
} | |
env: | |
BACKEND_GRAPHQL_URL: ${{secrets.BACKEND_GRAPHQL_URL_DEV_DS}} | |
NODE_ENV: 'production' | |
- name: Build application | |
run: npm run build --if-present |