-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (31 loc) · 1.17 KB
/
react-page.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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