Skip to content

Commit

Permalink
✨ NEW: github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hyper-dot committed Aug 9, 2024
1 parent 25136f2 commit fd890c9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2,713 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
branches:
- main
name: 🚀 Deploy website on push

jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3

- name: 🖥 Use Node.js 21
uses: actions/setup-node@v2
with:
node-version: "21"

- name: 🔨 Build Project
run: npm install && npm run build

- name: 📂 Copy Build Files to the server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
source: "dist,package.json,package-lock.json"
target: ${{secrets.TARGET}}


- name: ♻️ Restart the server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script : touch ${{secrets.RESTART}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "server",
"version": "0.0.1",
"description": "TypeScript Express Starter With TypeORM",
"description": "Typescript Server",
"type": "commonjs",
"devDependencies": {
"@types/chalk": "^2.2.0",
Expand Down
Loading

0 comments on commit fd890c9

Please sign in to comment.