Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…awa-admin into action-items
  • Loading branch information
meetulr committed Feb 21, 2024
2 parents e402627 + 5a625c7 commit 05611a0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-codescan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Dependencies
run: npm install
Expand Down Expand Up @@ -68,10 +68,10 @@ jobs:
# needs: Code-Quality-Checks
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand All @@ -85,7 +85,7 @@ jobs:
needs: [Code-Quality-Checks]
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Dependencies
run: npm install
Expand All @@ -107,7 +107,7 @@ jobs:
done
- name: Present and Upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
Expand All @@ -125,10 +125,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'

Expand Down
44 changes: 34 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- 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@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -51,7 +51,7 @@ jobs:
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@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
Expand All @@ -60,19 +60,24 @@ jobs:

Generate-Documentation:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/automated-docs'
if: github.ref == 'refs/heads/develop'
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# with:
# ref: develop

# - name: Pull latest changes from develop
# run: git pull origin develop

- name: Node.js Version
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Restore node_modules from cache
id: cache-npm
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand Down Expand Up @@ -133,7 +138,7 @@ jobs:
git config --global user.email "${{env.email}}"
git add .
git commit -m "Update documentation"
git push
git push origin develop:automated-docs --force
echo -e "🚀${Green} Hurrah! doc updated${NoColor}"
- name: Create Documentation Artifact
Expand All @@ -142,11 +147,30 @@ jobs:
name: documentation-admin
path: talawa-admin-docs

Copy-docs-to-talawa-docs:
Empty-Commit:
name: Create Empty Commit
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
needs: Generate-Documentation
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
token: ${{ secrets.TALAWA_DOCS_SYNC }}
- name: Empty Commit
run: |
git config --global user.name "${{github.actor}}"
git config --global user.email "${{env.email}}"
git config --global url.https://${{ secrets.TALAWA_DOCS_SYNC }}@github.com/.insteadOf https://github.com/
git commit --allow-empty -m "Trigger Documentation Workflow"
git push origin develop:automated-docs --force
Copy-docs-to-talawa-docs:
if: github.ref == 'refs/heads/automated-docs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
Expand Down

0 comments on commit 05611a0

Please sign in to comment.