Merge pull request #12 from Hares27/team-PTHack #17
This file contains 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: Generate Index JSON | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
generate-index-json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- name: Set directory permissions | |
run: chmod -R 700 hacks | |
- name: Configure Git identity | |
run: | | |
git config --global user.name "Raj6939" | |
git config --global user.email "[email protected]" | |
- name: Run Generate Index JSON | |
run: npm run render | |
- name: Stage index file | |
run: git add hacks/index.json | |
- name: Commit changes | |
run: git commit -m "Adding JSON to Index file" | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
- name: Build | |
run: npm install && npm run build | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: dist |