Merge pull request #23 from chingu-voyages/zuweeali-patch-1 #22
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
# 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 |