-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: created new files for GitHub Actions
- Loading branch information
1 parent
7c12c4f
commit 8f8cfad
Showing
3 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
name: Build site | ||
name: Build dev site and deploy | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
push: | ||
branches: [ develop ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
environment: github-pages | ||
|
||
strategy: | ||
matrix: | ||
|
@@ -22,3 +23,15 @@ jobs: | |
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build release site and deploy | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: github-pages | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- name: Replacing the website's value for release | ||
run: sed -i 's/dev-simple.ghostvaibhav.com/ghostvaibhav.com/g' package.json | ||
- 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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
name: Build site and deploy | ||
name: Push to prod | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
environment: github-pages | ||
|
||
|
@@ -26,7 +23,7 @@ jobs: | |
run: npm install | ||
- name: Setting up Git | ||
run: | | ||
git remote set-url origin https://GhostVaibhav:${{ secrets.PASS }}@github.com/GhostVaibhav/Simple.git | ||
git remote set-url origin https://GhostVaibhav:${{ secrets.PASS }}@github.com/GhostVaibhav/prod-Simple.git | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Vaibhav Sharma" | ||
- name: Writing to environment variable | ||
|