Skip to content

only server

only server #1

Workflow file for this run

name: Only Server
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
# 安装 Node.js 和 npm
- name: Install Node.js and npm
uses: actions/setup-node@v2.1.5
with:
node-version: '18'
# 后端构建步骤
- name: Build and start Node.js server
working-directory: ./
run: |
npm install
sudo node app.js
env:
NODE_ENV: production