Updated Frontend and Backend #18
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: Publish React Application | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
publish_page: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup GitHub User | |
run: | | |
git config --global user.email "actions@users.noreply.github.com" | |
git config --global user.name 'Sachin Acharya' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
- name: Setup NodeJS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "20" | |
- name: Installing Dependencies | |
working-directory: Frontend | |
run: npm install | |
- name: Getting the latest commit message | |
id: commit_msg | |
run: echo "message=$(git log -1 --pretty=%B)" >> $GITHUB_OUTPUT | |
- name: Publish Page | |
working-directory: Frontend | |
run: npm run deploy -- -m "${{ steps.commit_msg.outputs.message }}" | |
shell: bash |