-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from MCSLTeam/ga-delopy
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
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: ./future.mcsl.com.cn/ | ||
log-level: verbose | ||
port: ${{ secrets.FTP_PORT }} | ||
exclude: | | ||
**/.git* | ||
**/.git*/** | ||
**/node_modules/** |