Skip to content

Commit

Permalink
Merge pull request #32 from sustech-cs304/Mandyyymeng-deployment-patch
Browse files Browse the repository at this point in the history
Create deploy.yaml
  • Loading branch information
Mandyyymeng authored May 26, 2024
2 parents 2af7303 + 7719f20 commit 6638d2b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to Production

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Deploy to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
source: "dist/*"
target: "/path/to/your/project"

0 comments on commit 6638d2b

Please sign in to comment.