Renovate Bot
60e736774d
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [appleboy/ssh-action](https://github.com/appleboy/ssh-action) | action | minor | `v1.0.3` -> `v1.1.0` | --- ### Release Notes <details> <summary>appleboy/ssh-action (appleboy/ssh-action)</summary> ### [`v1.1.0`](https://github.com/appleboy/ssh-action/releases/tag/v1.1.0) [Compare Source](https://github.com/appleboy/ssh-action/compare/v1.0.3...v1.1.0) ##### Changelog ##### Bug fixes - [`0c7561b`](0c7561b1a3
): fix: switch to SSH key authentication for security ([@​appleboy](https://github.com/appleboy)) ##### Enhancements - [`9b978f0`](9b978f09f2
): chore: update SSH action version in README files ([@​appleboy](https://github.com/appleboy)) - [`1991c55`](1991c553ec
): chore(file): update target file ([@​appleboy](https://github.com/appleboy)) - [`aa293c2`](aa293c24bb
): chore: optimize system configuration and API integration ([@​appleboy](https://github.com/appleboy)) - [`036cad7`](036cad7df7
): chore: update drone-ssh to version 1.7.7 ([@​appleboy](https://github.com/appleboy)) - [`8b60782`](8b6078208d
): chore(cli): enhance version handling and testing mechanisms ([@​appleboy](https://github.com/appleboy)) - [`5ade826`](5ade826485
): chore: improve CLI reliability and version visibility ([@​appleboy](https://github.com/appleboy)) - [`eaeb069`](eaeb06998d
): chore(cli): enhance curl command with silent mode and redirects ([@​appleboy](https://github.com/appleboy)) - [`58164d0`](58164d0dc2
): chore: remove Dockerfile and related configurations ([@​appleboy](https://github.com/appleboy)) ##### Refactor - [`da612c8`](da612c8015
): refactor: optimize CI pipeline for faster execution ([@​appleboy](https://github.com/appleboy)) ##### Build process updates - [`c781418`](c78141851a
): ci: enhance GitHub Actions for IPv6 and flexibility ([#​303](https://github.com/appleboy/ssh-action/issues/303)) ([@​appleboy](https://github.com/appleboy)) - [`d2d6858`](d2d6858859
): ci: enhance GitHub workflow for SSH actions and deployments ([@​appleboy](https://github.com/appleboy)) - [`551964e`](551964ebda
): ci: optimize GitHub Actions workflow configuration ([@​appleboy](https://github.com/appleboy)) - [`f916346`](f916346256
): ci: refactor CI workflow and improve robustness ([#​320](https://github.com/appleboy/ssh-action/issues/320)) ([@​appleboy](https://github.com/appleboy)) - [`aabaf12`](aabaf1254d
): ci: add bug report template ([@​appleboy](https://github.com/appleboy)) - [`c8594ae`](c8594ae37d
): ci: implement GitHub Actions for remote SSH execution ([@​appleboy](https://github.com/appleboy)) - [`40aad53`](40aad53c5a
): ci: add SSH authentication setup for GitHub Actions ([@​appleboy](https://github.com/appleboy)) - [`0b0e770`](0b0e77098a
): ci: optimize and enhance SSH server workflow ([@​appleboy](https://github.com/appleboy)) - [`977b74a`](977b74a12d
): ci: enhance CI workflow with SSH job and optimizations ([@​appleboy](https://github.com/appleboy)) - [`2eeab5b`](2eeab5bdba
): ci: refactor GitHub Actions key management ([@​appleboy](https://github.com/appleboy)) - [`acd41e5`](acd41e5091
): ci: enhance SSH job testing with varied key/password scenarios ([@​appleboy](https://github.com/appleboy)) - [`f05aefe`](f05aefe351
): ci: enhance SSH action configuration and error handling ([@​appleboy](https://github.com/appleboy)) - [`e40b597`](e40b597081
): ci: add GitHub Actions job for SSH key passphrase support ([@​appleboy](https://github.com/appleboy)) - [`15b64dc`](15b64dc891
): ci: enhance CI pipeline with SSH key handling improvements ([@​appleboy](https://github.com/appleboy)) - [`a39b3cc`](a39b3cce7d
): ci: enhance CI/CD pipeline with SSH command execution ([@​appleboy](https://github.com/appleboy)) - [`815c574`](815c5743ac
): ci: enhance deployment with multi-host SSH action ([@​appleboy](https://github.com/appleboy)) - [`378323e`](378323e4c8
): ci: add multi-server support to CI workflow ([@​appleboy](https://github.com/appleboy)) - [`fc1c1fc`](fc1c1fce51
): ci: add GitHub Actions job for [`ed25519`](https://github.com/appleboy/ssh-action/commit/ed25519) key support ([@​appleboy](https://github.com/appleboy)) - [`f0e5a23`](f0e5a23d53
): ci: add environment variable handling in GitHub Actions ([@​appleboy](https://github.com/appleboy)) - [`9c32aa6`](9c32aa61f8
): ci: refactor workflows and API integrations ([@​appleboy](https://github.com/appleboy)) - [`97f8d75`](97f8d752b5
): ci: enable root access in CI pipeline ([@​appleboy](https://github.com/appleboy)) - [`5a8776f`](5a8776fd15
): ci: switch to password authentication in GitHub workflow ([@​appleboy](https://github.com/appleboy)) - [`b6941ae`](b6941ae5d5
): ci: refactor codebase and optimize performance ([@​appleboy](https://github.com/appleboy)) - [`43895f2`](43895f2cd5
): ci: refactor SSH testing workflows and job configurations ([@​appleboy](https://github.com/appleboy)) - [`06fa62e`](06fa62e61c
): ci: rename the workflow files. ([@​appleboy](https://github.com/appleboy)) - [`b4a07ca`](b4a07ca594
): ci: enhance GitHub Actions with secret variable support ([#​330](https://github.com/appleboy/ssh-action/issues/330)) ([@​appleboy](https://github.com/appleboy)) - [`25ce8cb`](25ce8cbbcb
): ci: implement automated release workflow with GoReleaser ([@​appleboy](https://github.com/appleboy)) ##### Documentation updates - [`8a779a5`](8a779a5b1a
): docs: describe true usage of allenvs parameter ([#​301](https://github.com/appleboy/ssh-action/issues/301)) ([@​hussu010](https://github.com/hussu010)) - [`fe44be0`](fe44be0b96
): docs: improve documentation and CI robustness ([@​appleboy](https://github.com/appleboy)) - [`dd0f09c`](dd0f09ca07
): docs: improve README clarity and completeness ([@​appleboy](https://github.com/appleboy)) - [`71d43ea`](71d43ea0f7
): docs: improve documentation and testing configurations ([@​appleboy](https://github.com/appleboy)) - [`28428a1`](28428a13f5
): docs: improve cross-platform clipboard support for key copying ([@​appleboy](https://github.com/appleboy)) - [`d732991`](d732991ab0
): docs(lang): README.zh-cn Document ([#​332](https://github.com/appleboy/ssh-action/issues/332)) ([@​astralwaveio](https://github.com/astralwaveio)) </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:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==--> Reviewed-on: #482 Reviewed-by: Vylpes <ethan@vylpes.com> Co-authored-by: Renovate Bot <renovate@vylpes.com> Co-committed-by: Renovate Bot <renovate@vylpes.com>
67 lines
2.2 KiB
YAML
67 lines
2.2 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
|
|
|
|
- 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.1.0
|
|
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 }}
|
|
ABOUT_FUNDING: ${{ vars.PROD_ABOUT_FUNDING }}
|
|
ABOUT_REPO: ${{ vars.PROD_ABOUT_REPO }}
|
|
CACHE_INTERVAL: ${{ vars.PROD_CACHE_INTERVAL }}
|
|
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,CACHE_INTERVAL
|
|
script: |
|
|
source .sshrc \
|
|
&& cd /home/vylpes/apps/vylbot/vylbot_prod \
|
|
&& docker compose down \
|
|
&& (pm2 stop vylbot_prod || true) \
|
|
&& (pm2 delete vylbot_prod || true) \
|
|
&& docker compose up -d \
|
|
&& sleep 10 \
|
|
&& yarn db:up \
|
|
&& pm2 start --name vylbot_prod dist/vylbot.js
|