use npm i instead of ci #3
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
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 |