Skip to content

fix: recording and playback doc #9

fix: recording and playback doc

fix: recording and playback doc #9

Workflow file for this run

name: Build and Deploy via SFTP
on:
push:
branches: [ main, master ]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: github.repository == 'langhuihui/m7s-website'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm run build
- name: Verify build output
run: |
echo "Checking build output..."
ls -la .vitepress/
if [ -d ".vitepress/dist" ]; then
echo "Build directory exists"
ls -la .vitepress/dist/
else
echo "Build directory does not exist!"
exit 1
fi
- name: Deploy to server via SFTP
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SFTP_HOST }}
username: ${{ secrets.SFTP_USERNAME }}
key: ${{ secrets.SFTP_KEY }}
port: ${{ secrets.SFTP_PORT }}
source: ".vitepress/dist/"
target: ${{ secrets.SFTP_SERVER_DIR }}
strip_components: 2
rm: true