Renovate Bot
47991395ef
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [appleboy/ssh-action](https://github.com/appleboy/ssh-action) | action | patch | `v1.0.0` -> `v1.0.3` | --- ### Release Notes <details> <summary>appleboy/ssh-action (appleboy/ssh-action)</summary> ### [`v1.0.3`](https://github.com/appleboy/ssh-action/releases/tag/v1.0.3) [Compare Source](https://github.com/appleboy/ssh-action/compare/v1.0.2...v1.0.3) - Support the new parameter `request_pty` to request a pseudo-terminal from the server, addressing the sudo command issue. https://github.com/appleboy/ssh-action/pull/288 ### [`v1.0.2`](https://github.com/appleboy/ssh-action/releases/tag/v1.0.2) [Compare Source](https://github.com/appleboy/ssh-action/compare/v1.0.1...v1.0.2) upgrade ssh-proxy for security patch ### [`v1.0.1`](https://github.com/appleboy/ssh-action/releases/tag/v1.0.1): for security patch [Compare Source](https://github.com/appleboy/ssh-action/compare/v1.0.0...v1.0.1) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: #303 Reviewed-by: Vylpes <ethan@vylpes.com> Co-authored-by: Renovate Bot <renovate@vylpes.com> Co-committed-by: Renovate Bot <renovate@vylpes.com>
77 lines
No EOL
2.9 KiB
YAML
77 lines
No EOL
2.9 KiB
YAML
name: Deploy To Production
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
environment: prod
|
|
|
|
runs-on: node
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18.x
|
|
- run: yarn install --frozen-lockfile
|
|
- run: yarn build
|
|
- run: yarn test
|
|
- run: yarn lint
|
|
|
|
- name: "Copy files over to location"
|
|
run: cp -r . ${{ secrets.PROD_REPO_PATH }}
|
|
|
|
deploy:
|
|
environment: prod
|
|
needs: build
|
|
runs-on: node
|
|
steps:
|
|
- uses: https://github.com/appleboy/ssh-action@v1.0.3
|
|
env:
|
|
DB_NAME: ${{ secrets.PROD_DB_NAME }}
|
|
DB_AUTH_USER: ${{ secrets.PROD_DB_AUTH_USER }}
|
|
DB_AUTH_PASS: ${{ secrets.PROD_DB_AUTH_PASS }}
|
|
DB_HOST: ${{ secrets.PROD_DB_HOST }}
|
|
DB_PORT: ${{ secrets.PROD_DB_PORT }}
|
|
DB_ROOT_HOST: ${{ secrets.PROD_DB_ROOT_HOST }}
|
|
DB_SYNC: ${{ secrets.PROD_DB_SYNC }}
|
|
DB_LOGGING: ${{ secrets.PROD_DB_LOGGING }}
|
|
DB_DATA_LOCATION: ${{ secrets.PROD_DB_DATA_LOCATION }}
|
|
SERVER_PATH: ${{ secrets.PROD_SSH_SERVER_PATH }}
|
|
BOT_TOKEN: ${{ secrets.PROD_BOT_TOKEN }}
|
|
BOT_VER: ${{ vars.PROD_BOT_VER }}
|
|
BOT_AUTHOR: ${{ vars.PROD_BOT_AUTHOR }}
|
|
BOT_OWNERID: ${{ vars.PROD_BOT_OWNERID }}
|
|
BOT_CLIENTID: ${{ vars.PROD_BOT_CLIENTID }}
|
|
BOT_ENV: ${{ vars.PROD_BOT_ENV }}
|
|
BOT_ADMINS: ${{ vars.PROD_BOT_ADMINS }}
|
|
ABOUT_FUNDING: ${{ vars.PROD_ABOUT_FUNDING }}
|
|
ABOUT_REPO: ${{ vars.PROD_ABOUT_REPO }}
|
|
DATA_DIR: ${{ secrets.PROD_DATA_DIR }}
|
|
GDRIVESYNC_AUTO: ${{ vars.PROD_GDRIVESYNC_AUTO }}
|
|
EXPRESS_PORT: ${{ secrets.PROD_EXPRESS_PORT }}
|
|
BOT_LOGLEVEL: ${{ vars.PROD_BOT_LOGLEVEL }}
|
|
BOT_LOG_DISCORD_ENABLE: ${{ vars.PROD_BOT_LOG_DISCORD_ENABLE }}
|
|
BOT_LOG_DISCORD_LEVEL: ${{ vars.PROD_BOT_LOG_DISCORD_LEVEL }}
|
|
BOT_LOG_DISCORD_WEBHOOK: ${{ secrets.PROD_BOT_LOG_DISCORD_WEBHOOK }}
|
|
BOT_LOG_DISCORD_SERVICE: ${{ vars.PROD_BOT_LOG_DISCORD_SERVICE }}
|
|
with:
|
|
host: ${{ secrets.PROD_SSH_HOST }}
|
|
username: ${{ secrets.PROD_SSH_USER }}
|
|
key: ${{ secrets.PROD_SSH_KEY }}
|
|
port: ${{ secrets.PROD_SSH_PORT }}
|
|
envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,BOT_ENV,BOT_ADMINS,DATA_DIR,GDRIVESYNC_AUTO,SERVER_PATH,EXPRESS_PORT,BOT_LOGLEVEL,BOT_LOG_DISCORD_ENABLE,BOT_LOG_DISCORD_LEVEL,BOT_LOG_DISCORD_WEBHOOK,BOT_LOG_DISCORD_SERVICE
|
|
script: |
|
|
source .sshrc \
|
|
&& cd /home/vylpes/apps/card-drop/card-drop_prod \
|
|
&& docker compose down \
|
|
&& (pm2 stop card-drop_prod || true) \
|
|
&& (pm2 delete card-drop_prod || true) \
|
|
&& docker compose up -d \
|
|
&& sleep 10 \
|
|
&& yarn run db:up \
|
|
&& pm2 start --name card-drop_prod dist/bot.js |