feat(cache): add clear cache button to resolve issues with delayed mu… #252
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
web-deploy: | |
name: 🎉 Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚚 Get latest code | |
uses: actions/checkout@v4 | |
with: | |
# 获取所有标记和分支的所有历史记录(updatetime 必须,否则每次都会变化) | |
fetch-depth: 0 | |
# 如果你文档需要 Git 子模块,取消注释下一行 | |
# submodules: true | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build website | |
run: yarn build | |
# - name: Deploy | |
# uses: JamesIves/github-pages-deploy-action@v4 | |
# with: | |
# # 这是文档部署到的分支名称 | |
# branch: gh-pages | |
# folder: build | |
# - name: 📂 Sync files | |
# uses: SamKirkland/[email protected] | |
# with: | |
# local-dir: build/ | |
# server: ${{ secrets.ftp_host }} | |
# username: ${{ secrets.ftp_username }} | |
# password: ${{ secrets.ftp_password }} | |
# port: ${{ secrets.ftp_port }} # 建议更改默认的 21 端口 | |
# timeout: 600000 |