🔧chore: api listen all host #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy RGD-BOT | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
env: | |
NODE_VERSION: 18.x | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.3.0 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'pnpm' | |
- name: install and lint | |
run: | | |
pnpm install --no-frozen-lockfile | |
pnpm run lint | |
pnpm run ts-check | |
tsc | |
pnpm sentry:sourcemaps | |
deploy: | |
needs: [lint] | |
runs-on: ubuntu-latest | |
steps: | |
- name: SSH and deploy node app | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd ~/rgd-bot | |
chmod +x ./scripts/deploy.sh | |
./scripts/deploy.sh |