Skip to content

Commit

Permalink
added deployement realted files
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragjatofficial committed Sep 28, 2023
1 parent a66924e commit dd9ef56
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
51 changes: 51 additions & 0 deletions frontend/covisafe/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy

on:
push:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 16

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build project
run: npm run build

- name: Upload production-ready build files
uses: actions/upload-artifact@v2
with:
name: production-files
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: production-files
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
3 changes: 3 additions & 0 deletions frontend/covisafe/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"homepage": "https://anuragjatofficial.github.io/covisafe-plus",
"name": "covisafe",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"predeploy":"npm run build",
"deploy" : "gh-pages -d dist",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
Expand Down
1 change: 1 addition & 0 deletions frontend/covisafe/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base:"/vite-deploy/"
})

0 comments on commit dd9ef56

Please sign in to comment.