chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /client (#398) #1404
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: main | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
- prod | |
jobs: | |
build_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.2.2 | |
- name: Setup Node | |
uses: actions/setup-node@v4.1.0 | |
with: | |
node-version: 21.4.0 | |
- name: Setup Npm | |
run: npm install -g npm@10.2.4 | |
- name: Install client dependencies | |
run: cd client && npm install && cd .. | |
- name: Install server dependencies | |
run: cd server && npm install && cd .. | |
- name: Build client | |
run: cd client && npm run build && cd .. | |
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' || github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'prod' || github.event_name == 'push' && github.ref == 'refs/heads/prod' }} | |
name: Frontend Tests | |
run: cd client && npm run test && cd .. | |
deploy: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/prod' }} | |
runs-on: ubuntu-latest | |
needs: build_test | |
steps: | |
- name: Deploy to Production | |
uses: appleboy/ssh-action@v1.2.0 | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
script: | | |
export NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
bash ./deploy.sh |