name: Deploy on: push: branches: [main] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout run: | git config --global --add safe.directory '*' git clone --depth 1 "https://hoelee:${{ secrets.PAT }}@git.hoelee.com/hoelee/hoelee-blog.git" . git checkout $GITHUB_SHA 2>/dev/null || true - name: Install dependencies run: npm ci - name: Build run: npm run build - name: Deploy to nginx-hoelee-blog run: | rm -rf /mnt/user/docker/nginx-hoelee-blog/html/* cp -r dist/* /mnt/user/docker/nginx-hoelee-blog/html/ echo "Deployed. Contents:" ls -la /mnt/user/docker/nginx-hoelee-blog/html/