update: 《开源项目不能收费》 repo link #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Website | |
on: [push, workflow_dispatch] | |
permissions: write-all | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⏰Set time zone | |
uses: szenius/[email protected] | |
with: | |
timezoneLinux: 'Asia/Shanghai' | |
- name: Check out Git Repository | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Cache NPM Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-npm-cache | |
restore-keys: | | |
${{ runner.OS }}-npm-cache | |
- name: Install Dependencies | |
run: | | |
npm i -g pnpm | |
pnpm i | |
- name: Build | |
run: pnpm run build | |
- name: 📂 FTP Deploy | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
local-dir: ./docs/.vuepress/dist/ | |
server-dir: ./lz.mcsl.com.cn/ | |
log-level: verbose | |
port: ${{ secrets.FTP_PORT }} | |
exclude: | | |
**/.git* | |
**/.git*/** | |
**/node_modules/** |