Skip to content

Commit

Permalink
Adding example changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Frnn4268 committed May 31, 2024
1 parent fddca47 commit 8e149fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/deploy-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,23 @@ jobs:
deploy-host-1:
runs-on: chat-easypark-deploy
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

# Install project dependencies
- name: Install Dependencies
working-directory: server
run: |
npm install
echo MONGO_URL="mongodb+srv://Frnn:noobculo@mongocluster.o2eojyk.mongodb.net/snappy?retryWrites=true&w=majority" > .env
# Set up SSH key for authentication
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
Expand All @@ -32,6 +36,7 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST1 }}

# Deploy to the remote server
- name: Deploy to Remote Server
working-directory: server
run: |
Expand All @@ -47,19 +52,23 @@ jobs:
deploy-host-2:
runs-on: chat-easypark-deploy
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

# Install project dependencies
- name: Install Dependencies
working-directory: server
run: |
npm install
echo MONGO_URL="mongodb+srv://Frnn:noobculo@mongocluster.o2eojyk.mongodb.net/snappy?retryWrites=true&w=majority" > .env
# Set up SSH key for authentication
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
Expand All @@ -70,6 +79,7 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST2 }}

# Deploy to the remote server
- name: Deploy to Remote Server
working-directory: server
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_HOST: ${{ secrets.SSH_HOST1 }}

host-2:
runs-on: self-hosted
steps:
Expand Down

0 comments on commit 8e149fe

Please sign in to comment.