tailwind-nextjs-blog/.github/workflows/build-and-deploy-by-ftp.yaml

31 lines
707 B
YAML
Raw Normal View History

name: 🚀 Build and deploy by ftp
on:
push:
2023-07-09 13:33:17 +08:00
branches:
- master
- main
jobs:
ftp-build-and-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
2023-07-09 13:43:12 +08:00
uses: https://github.com/actions/checkout@v3
2023-07-09 13:43:12 +08:00
- uses: https://github.com/actions/setup-node@v3
with:
2023-07-09 13:33:17 +08:00
node-version: 16
- run: npm i --location=global pnpm@7
- run: pnpm i
- run: pnpm build
- run: npm run export
- name: 📂 Sync files
2023-07-09 13:43:12 +08:00
uses: https://github.com/SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.ftp_server }}
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}