Skip to content

Merge pull request #23 from chingu-voyages/zuweeali-patch-1 #22

Merge pull request #23 from chingu-voyages/zuweeali-patch-1

Merge pull request #23 from chingu-voyages/zuweeali-patch-1 #22

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Build and Deploy Server
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci --prefix server
- name: Copy server files to EC2 server
uses: contention/[email protected]
with:
# The server user
user: ec2-user
# The deployment target
host: https://ec2-54-177-26-87.us-west-1.compute.amazonaws.com/
# The local path to sync
localpath: server
# The remote path to sync
remotepath: /home/www
# The private key
deploy_key: ${{ secrets.SERVER_DEPLOYMENT_KEY }}
# TODO start/restart the node server