diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9f1635c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 }} diff --git a/setup/functions.sh b/setup/functions.sh index a2cda81..b7c1694 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -1,3 +1,5 @@ +#!/bin/bash + build() { echo '⚙ Building docs...' diff --git a/setup/git.sh b/setup/git.sh index 4a46ada..25ce986 100644 --- a/setup/git.sh +++ b/setup/git.sh @@ -1,3 +1,5 @@ +#!/bin/bash + git_sync() { echo "📥 Syncing $DOCS_NAME repository..." echo '' diff --git a/setup/tips.sh b/setup/tips.sh index a6ea1c5..d1718a0 100644 --- a/setup/tips.sh +++ b/setup/tips.sh @@ -1,3 +1,5 @@ +#!/bin/bash + welcome() { echo ' ██████╗███████╗██╗ █████╗ ███╗ ██╗████████╗ ██████╗ ██████╗ ██████╗███████╗ diff --git a/setup/tools.sh b/setup/tools.sh index 77c23b0..054d785 100644 --- a/setup/tools.sh +++ b/setup/tools.sh @@ -1,3 +1,5 @@ +#!/bin/bash + if [ "$ENV" = "prod" ]; then if ! command -v pm2 &> /dev/null; then echo ' ∟ Installing pm2...'