Skip to content

Commit

Permalink
refactor: refactored the release files for updated structure (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostVaibhav authored Jul 6, 2024
1 parent 488da95 commit 3d65fbd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/node.js.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,31 @@ jobs:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: develop
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Installing dependencies
run: npm install
- name: Setting up Git
run: |
git remote set-url origin https://GhostVaibhav:${{ secrets.PASS }}@github.com/GhostVaibhav/Simple.git
git config --global user.email "[email protected]"
git config --global user.name "Vaibhav Sharma"
- name: Writing to environment variable
run: |
touch .env
echo 'REACT_APP_RECAPTCHA_KEY=${{ secrets.REACT_APP_RECAPTCHA_KEY }}' >> .env
npm install gh-pages --save-dev
- name: Building and deploying the site
run: npm run deploy
touch .env
echo 'REACT_APP_RECAPTCHA_KEY=${{ secrets.REACT_APP_RECAPTCHA_KEY }}' >> .env
- name: Build the website
run: npm run build
- name: Creating the CNAME file
run: echo 'dev-simple.ghostvaibhav.com' > ./build/CNAME
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'build'
destination-github-username: 'GhostVaibhav'
destination-repository-name: 'dev-Simple'
user-email: [email protected]
target-branch: main
6 changes: 5 additions & 1 deletion .github/workflows/node.js.release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Build release site and deploy

on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
Expand All @@ -13,7 +15,9 @@ jobs:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: main
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand Down

0 comments on commit 3d65fbd

Please sign in to comment.