Skip to content

DnT Workflow

DnT Workflow #2619

Workflow file for this run

name: DnT Workflow
on:
schedule:
- cron: '0 */24 * * *'
push:
branches:
- daddy
pull_request:
branches:
- daddy
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 14.16.1
uses: actions/setup-node@v3
with:
node-version: 14.16.1
- name: Install NPM Packages
run: npm install
- name: Create env file
run: |
cat << EOF >> .env
GATSBY_RECRUITMENT_TRIPETTO=${{ secrets.GATSBY_RECRUITMENT_TRIPETTO }}
GATSBY_WIT_PODCAST=${{ secrets.GATSBY_WIT_PODCAST }}
EOF
- name: Lint check
run: npx eslint . --fix --max-warnings=0
- name: Build script
run: npm run build
- name: Pass on build directory
uses: actions/upload-artifact@v3
with:
name: public
path: public
deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref=='refs/heads/daddy'
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: public
path: public
# Runs a set of commands using the runners shell
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.IET_PAT }}
publish_dir: public
cname: iet.nitk.ac.in
user_name: 'ietnitk[bot]'
allow_empty_commit: true
user_email: 'ietnitk[bot]@users.noreply.github.com'
contrib-readme-job:
runs-on: ubuntu-latest
name: Contributor Bot
if: github.ref=='refs/heads/daddy'
steps:
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@v2.3.4
env:
GITHUB_TOKEN: ${{ secrets.IET_PAT }}
with:
columns_per_row: 5