Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Quattrochi authored Mar 7, 2024
1 parent f06dd4a commit 5605eb5
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
name: JTC Cats Workflow

name: Deployment
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Install Dependencies and Start Server
run: |
cd server
npm install
npm start
test:
needs: deploy
runs-on: ubuntu-latest

steps:
- name: Wait for Server to Start
run: sleep 10 # Adjust this duration based on your server startup time

- name: Install Client Dependencies and Start Client
run: |
cd client
npm install
npm start
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Packages
run: npm install
- name: Setup Homepage
run: sed -i 's|$HOMEPAGE|${{ github.repository }}|g' $GITHUB_WORKSPACE/package.json ; sed -i 's|${{ github.repository_owner }}/||g' $GITHUB_WORKSPACE/package.json
- name: Build page
run: npm run build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3

0 comments on commit 5605eb5

Please sign in to comment.