This commit is contained in:
parent
c71dbaa0b9
commit
23553c6044
2 changed files with 10 additions and 14 deletions
|
@ -13,24 +13,17 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Use Node.js 19
|
- name: Install PM2
|
||||||
uses: actions/setup-node@v4
|
run: npm i -g pm2
|
||||||
with:
|
|
||||||
node-version: 19
|
|
||||||
|
|
||||||
env:
|
- name: Set up SSH
|
||||||
SSH_PRIVATE_KEY: ${{secrets.SSH_KEY}}
|
run: |
|
||||||
SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}
|
mkdir -p ~/.ssh/
|
||||||
|
echo "${{ secrets.SSH_KEY }}" > ./deploy.key
|
||||||
|
sudo chmod 600 ./deploy.key
|
||||||
|
|
||||||
- name: Install PM2
|
- name: Install PM2
|
||||||
run: npm i -g pm2
|
run: npm i -g pm2
|
||||||
|
|
||||||
- name: Add Deploy Key to SSH
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.SSH_KEY }}" >> ./deploy.key
|
|
||||||
sudo chmod 600 ./deploy.key
|
|
||||||
echo "${{ secrets.SSH_KNOWN_HOSTS}}" > ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: pm2 deploy ecosystem.config.cjs production
|
run: pm2 deploy ecosystem.config.cjs production
|
||||||
|
|
|
@ -6,4 +6,7 @@ export default defineConfig({
|
||||||
define: {
|
define: {
|
||||||
APP_VERSION: JSON.stringify(process.env.npm_package_version),
|
APP_VERSION: JSON.stringify(process.env.npm_package_version),
|
||||||
},
|
},
|
||||||
|
build: {
|
||||||
|
minify: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue