name: Deploy to Server on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 cache: npm - name: Install dependencies run: npm ci - name: Build run: npm run build - name: Decode SSH key run: | echo "${{ secrets.SSH_PRIVATE_KEY }}" | base64 -d > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 - name: Deploy via SCP uses: appleboy/scp-action@v0.1.7 with: host: ${{ secrets.SSH_HOST }} port: ${{ secrets.SSH_PORT }} username: root key_path: ~/.ssh/id_ed25519 source: dist/* target: /var/www/proto.bodalab.diffthink.kr/ strip_components: 1