Skip to content

Merge pull request #57 from GhostVaibhav/hotfix-update-ci-pipeline #55

Merge pull request #57 from GhostVaibhav/hotfix-update-ci-pipeline

Merge pull request #57 from GhostVaibhav/hotfix-update-ci-pipeline #55

Workflow file for this run

name: Build dev site and deploy
on:
push:
branches: [ develop ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment: github-pages
strategy:
matrix:
node-version: [20.x]
steps:
- 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: Writing to environment variable
run: |
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