Skip to content

Commit

Permalink
Merge branch 'develop-postgres' into issue-2527-fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
gurramkarthiknetha authored Dec 27, 2024
2 parents 098b05c + 83ee2e0 commit d3ba8f1
Show file tree
Hide file tree
Showing 70 changed files with 3,380 additions and 988 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ src/components/CheckIn/tagTemplate.ts
package.json
package-lock.json
tsconfig.json

# Ignore the Docusaurus website subdirectory
docs/**
6 changes: 5 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@
"**/*.scss",
"**/*.less",
"**/*.json",
"**/*.svg"
"**/*.svg",
"docs/docusaurus.config.ts",
"docs/sidebars.ts",
"docs/src/**",
"docs/blog/**"
]
}
24 changes: 24 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ jobs:
for file in ${CHANGED_UNAUTH_FILES}; do
echo "$file is unauthorized to change/delete"
done
echo "To override this, apply the 'ignore-sensitive-files-pr' label"
exit 1
Count-Changed-Files:
Expand Down Expand Up @@ -243,6 +244,7 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
gcov_ignore: 'docs/'
fail_ci_if_error: false
files: './coverage/lcov.info'
name: '${{env.CODECOV_UNIQUE_NAME}}'
Expand Down Expand Up @@ -352,6 +354,7 @@ jobs:
if [ -f .pidfile_dev ]; then
kill "$(cat .pidfile_dev)"
fi
Docker-Start-Check:
name: Check if Talawa Admin app starts in Docker
runs-on: ubuntu-latest
Expand Down Expand Up @@ -402,6 +405,27 @@ jobs:
docker stop talawa-admin-app-container
docker rm talawa-admin-app-container
Test-Docusaurus-Deployment:
name: Test Deployment to https://docs-admin.talawa.io
runs-on: ubuntu-latest
needs: [Docker-Start-Check, Start-App-Without-Docker]
# Run only if the develop-postgres branch and not dependabot
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: 'docs/'
# Run Docusaurus in the ./docs directory
- name: Install dependencies
working-directory: ./docs
run: yarn install --frozen-lockfile
- name: Test building the website
working-directory: ./docs
run: yarn build

Check-Target-Branch:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Check Target Branch
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/push-deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
##############################################################################
##############################################################################
#
# NOTE!
#
# Please read the README.md file in this directory that defines what should
# be placed in this file
#
##############################################################################
##############################################################################

name: PUSH Workflow - Website Deployment

on:
push:
branches:
- 'develop-postgres'

env:
CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}

jobs:
Deploy-Docusaurus:
name: Deploy https://docs-admin.talawa.io website
runs-on: ubuntu-latest
# Run only if the develop-postgres branch and not dependabot
if: ${{ github.actor != 'dependabot[bot]' }}
environment:
name: gh-pages
url: https://docs-admin.talawa.io
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: 'docs/'
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }}
- name: Deploy to GitHub Pages
env:
USE_SSH: true
GIT_USER: git
working-directory: ./docs
run: |
git config --global user.email "[email protected]"
git config --global user.name "gh-actions"
yarn install --frozen-lockfile
yarn deploy
121 changes: 76 additions & 45 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,85 @@
##############################################################################
##############################################################################

name: push workflow
# name: PUSH Workflow - All Branches

on:
push:
branches:
- '**'
# on:
# push:
# branches:
# - '**'

env:
CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}
# env:
# CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}

jobs:
Code-Coverage:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Test and Calculate Code Coverage
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# jobs:
# Code-Coverage:
# if: ${{ github.actor != 'dependabot[bot]' }}
# name: Test and Calculate Code Coverage
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [22.x]
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}

- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-code-coverage-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-code-coverage-${{ env.cache-name }}-
${{ runner.os }}-code-coverage-
${{ runner.os }}-
# - name: Cache node modules
# id: cache-npm
# uses: actions/cache@v4
# env:
# cache-name: cache-node-modules
# with:
# path: |
# ~/.npm
# node_modules
# key: ${{ runner.os }}-code-coverage-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-code-coverage-${{ env.cache-name }}-
# ${{ runner.os }}-code-coverage-
# ${{ runner.os }}-

- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
run: npm install
- run: npm run test -- --watchAll=false --coverage
- name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: false
name: '${{env.CODECOV_UNIQUE_NAME}}'
# - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
# name: List the state of node modules
# run: npm install
# - run: npm run test -- --watchAll=false --coverage
# - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# verbose: true
# gcov_ignore: 'docs/'
# fail_ci_if_error: false
# name: '${{env.CODECOV_UNIQUE_NAME}}'

# Deploy-Docusaurus:
# name: Deploy https://docs-admin.talawa.io website
# runs-on: ubuntu-latest
# needs: [Code-Coverage]
# # Run only if the develop-postgres branch and not dependabot
# if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }}
# environment:
# name: github-pages
# url: https://docs-admin.talawa.io
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 22
# cache: yarn
# cache-dependency-path: 'docs/'
# - uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }}
# - name: Deploy to GitHub Pages
# env:
# USE_SSH: true
# GIT_USER: git
# working-directory: ./docs
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "gh-actions"
# yarn install --frozen-lockfile
# yarn deploy

Empty file added .nojekyll
Empty file.
22 changes: 22 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader
.package-lock.json
package-lock.json

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs-admin.talawa.io
Loading

0 comments on commit d3ba8f1

Please sign in to comment.