mirror of
https://github.com/Kizuren/kizuren.dev.git
synced 2025-12-21 13:06:11 +01:00
Added workflow & updated README.md
This commit is contained in:
parent
30d747e046
commit
d1c997d857
3 changed files with 42 additions and 35 deletions
27
.github/workflows/deploy.yml
vendored
Normal file
27
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Deploy to Production
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: SSH and deploy
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
script: |
|
||||
cd /var/www/marcus7i.net
|
||||
git pull
|
||||
npm ci
|
||||
npm run build
|
||||
pm2 reload ecosystem.config.cjs || pm2 start ecosystem.config.cjs
|
||||
|
||||
# For system restarts
|
||||
pm2 save
|
||||
34
README.md
34
README.md
|
|
@ -2,37 +2,3 @@
|
|||
|
||||
marcus7i.net © 2025 by MarcUs7i is licensed under CC BY-NC 4.0<br>
|
||||
This is the source code for [marcus7i.net](https://marcus7i.net)
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
```
|
||||
14
ecosystem.config.cjs
Normal file
14
ecosystem.config.cjs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
module.exports = {
|
||||
apps: [{
|
||||
name: 'marcus7i',
|
||||
script: '.output/server/index.mjs',
|
||||
instances: 'max',
|
||||
exec_mode: 'cluster',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: 9031
|
||||
},
|
||||
watch: false,
|
||||
max_memory_restart: '1G'
|
||||
}]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue