2023-07-09 13:29:05 +08:00
|
|
|
name: 🚀 Build and deploy by ftp
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-07-09 13:33:17 +08:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- main
|
2023-07-09 13:29:05 +08:00
|
|
|
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:29:05 +08:00
|
|
|
|
2023-07-09 13:43:12 +08:00
|
|
|
- uses: https://github.com/actions/setup-node@v3
|
2023-07-09 13:29:05 +08:00
|
|
|
with:
|
2023-07-09 22:43:15 +08:00
|
|
|
node-version: 18
|
2023-07-09 13:29:05 +08:00
|
|
|
|
2023-07-09 14:24:36 +08:00
|
|
|
- name: Install dependencies
|
2023-09-10 17:15:41 +08:00
|
|
|
run: yarn install
|
2023-07-09 14:24:36 +08:00
|
|
|
|
2023-09-10 17:15:41 +08:00
|
|
|
- run: yarn build
|
2023-07-09 13:29:05 +08:00
|
|
|
|
|
|
|
- name: 📂 Sync files
|
2023-09-10 21:45:05 +08:00
|
|
|
uses: https://github.com/airvzxf/ftp-deployment-action@latest
|
2023-07-09 13:29:05 +08:00
|
|
|
with:
|
|
|
|
server: ${{ secrets.ftp_server }}
|
2023-09-10 21:45:05 +08:00
|
|
|
user: ${{ secrets.ftp_username }}
|
2023-07-09 23:00:53 +08:00
|
|
|
password: ${{ secrets.ftp_password }}
|
2023-09-10 21:45:05 +08:00
|
|
|
remote_dir: ./WEB/
|
|
|
|
local_dir: ./out/
|