Skip to content

Commit

Permalink
feat: gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfYangFan authored Oct 7, 2024
1 parent 6420634 commit b6eb47d
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/delopy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Delopy 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/**

0 comments on commit b6eb47d

Please sign in to comment.