Skip to content

Commit

Permalink
#30 feat: add deploy and fix shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Oct 27, 2024
1 parent 235dd33 commit 046d3c6
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy CSlant Server

on:
push:
branches: [ "main" ]

jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master

deploy:
runs-on: self-hosted
needs: shellcheck
steps:
- name: Deploy to Remote Host
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USERNAME }}
password: ${{ secrets.REMOTE_PASS }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.REMOTE_PORT }}
script: |
cd ${{ secrets.DOCS_RUNNER_PATH }}
${{ secrets.DOCS_RUNNER_SPECIAL_COMMAND }}
2 changes: 2 additions & 0 deletions setup/functions.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

build() {
echo '⚙ Building docs...'

Expand Down
2 changes: 2 additions & 0 deletions setup/git.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

git_sync() {
echo "📥 Syncing $DOCS_NAME repository..."
echo ''
Expand Down
2 changes: 2 additions & 0 deletions setup/tips.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

welcome() {
echo '
██████╗███████╗██╗ █████╗ ███╗ ██╗████████╗ ██████╗ ██████╗ ██████╗███████╗
Expand Down
2 changes: 2 additions & 0 deletions setup/tools.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

if [ "$ENV" = "prod" ]; then
if ! command -v pm2 &> /dev/null; then
echo ' ∟ Installing pm2...'
Expand Down

0 comments on commit 046d3c6

Please sign in to comment.