Skip to content

Commit

Permalink
deployment using github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hordiienkoalina committed Aug 9, 2024
1 parent dbb58b6 commit 9dda8a6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main # Trigger deployment when pushing to main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v3
with:
lfs: true # Enable LFS

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: Build and Deploy
run: npm run deploy
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
},
"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"predeploy": "npm run build && git lfs install && git lfs track '*.csv' '*.geojson' && git add .gitattributes && git add build/ && git commit -m 'Preparing LFS files for deployment'",
"deploy": "gh-pages -d build",
"predeploy": "npm run build",
"deploy": "git lfs install && git lfs pull && gh-pages -d build",
"build": "react-scripts --openssl-legacy-provider build",
"test": "react-scripts --openssl-legacy-provider test",
"eject": "react-scripts eject"
Expand Down

0 comments on commit 9dda8a6

Please sign in to comment.