Skip to content

使用太记桌面版同步 #799

使用太记桌面版同步

使用太记桌面版同步 #799

Workflow file for this run

name: 部署 Tiddlywiki 静态页面到 Github Pages
on:
push:
branches:
- master
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 'latest'
run_install: false
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
~/.pnpm-store
~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
${{ runner.os }}-node-
- name: Install Dependencies
run: pnpm install
- name: 构建在线版本网页
run: pnpm run buildonline
- name: 构建可下载离线版本的网页
run: pnpm run buildoffline
- name: Workbox 离线缓存
run: npx workbox injectManifest workbox-config.js
- name: 构建插件库
run: pnpm run buildlibrary
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: ./public-dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- uses: jsmrcaga/[email protected]
with:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_PERSONAL_ACCESS_TOKEN }}
NETLIFY_DEPLOY_TO_PROD: true
NETLIFY_SITE_ID: 2d87784e-fe3b-47a2-ae73-7a2f266f74a8
build_directory: ./public-dist
NETLIFY_DEPLOY_MESSAGE: "Deployed from GitHub action"
install_command: "echo Skipping installing the dependencies"
build_command: "echo Skipping building the web files"