-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f06dd4a
commit 5605eb5
Showing
1 changed file
with
18 additions
and
26 deletions.
There are no files selected for viewing
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
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 | ||
|