Skip to content

use npm i instead of ci #3

use npm i instead of ci

use npm i instead of ci #3

name: Deploy Backend
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: |
cd Scraper
npm install
- name: Run backend script
run: |
cd Scraper
npx ts-node src/split.ts
- name: Deploy to gh-pages branch
run: |
git checkout --orphan gh-pages
git rm -rf .
echo "node_modules/" > .gitignore
echo "Scraper/" >> .gitignore
git add .
git -c user.name='github-actions' -c user.email='[email protected]' commit -m "Deploy backend"
git push -f origin gh-pages