Skip to content

Merge pull request #107 from aabhinavg1/aabhinavg1-patch-1 #145

Merge pull request #107 from aabhinavg1/aabhinavg1-patch-1

Merge pull request #107 from aabhinavg1/aabhinavg1-patch-1 #145

Workflow file for this run

name: Node.js CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: false # Avoid cloning submodules (we'll manually clone the private repo)
- name: Clone the newsletter_modal repository
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }} # Ensure the PAT_TOKEN is available here
run: |
echo "Cloning the newsletter_modal repository..."
# Clone the private repository and place it in the desired location within the public repo
git clone https://${{ secrets.PAT_TOKEN }}@github.com/aabhinavg1/newletter_modal.git ./src/pages/newsletter_modal_updated
- name: Copy private repository code into public repo
run: |
echo "Copying private repository code into public repository..."
# Check if the file already exists, if not, copy it
for file in src/pages/newsletter_modal_updated/*; do
if [ ! -e "./$file" ]; then
cp -r "$file" ./src/pages/newsletter_modal_updated/
else
echo "$file already exists, skipping copy."
fi
done
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Build the project
run: npm run build