删除并不可靠的医生信息,更正部分描述,增加实用内容(HRT治疗期间监测) (#1490) #247
This file contains hidden or 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: 部署到 Cloudflare | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| paths: | |
| - '.github/workflows/deploy.yaml' | |
| - 'content/**' | |
| - 'static/**' | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 克隆 Next-MtF-wiki 仓库 | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: project-trans/Next-MtF-wiki | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: 更新 source submodule 为 master 最新内容 | |
| run: | | |
| cd source | |
| git remote set-url origin https://github.com/${{ github.repository }}.git | |
| git fetch origin master | |
| git checkout -qf FETCH_HEAD | |
| cd .. | |
| git add source | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -m "Update source submodule to master" || true | |
| git checkout -B master | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Generate timestamp | |
| id: gen_ts | |
| run: echo "TIMESTAMP=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT | |
| - name: Build project | |
| run: pnpm run build | |
| env: | |
| NEXT_PUBLIC_SITE_URL: 'https://mtf.wiki/' | |
| NEXT_PUBLIC_ROBOTS_ALLOW: 'true' | |
| NEXT_PUBLIC_INCLUDE_SITEMAP: 'true' | |
| NEXT_PUBLIC_DEPLOY_TIME: ${{ steps.gen_ts.outputs.TIMESTAMP }} | |
| NEXT_PUBLIC_SERVER_BUILD_INDEX: 'true' | |
| NEXT_PUBLIC_BANNER_TEXT: 'banner-text-disclaimer' | |
| NEXT_PUBLIC_EDIT_LINK_GITHUB_URL: "https://github.com/project-trans/MtF-wiki/tree/master/" | |
| NEXT_PUBLIC_OG_BASE_URL: "https://mtf.wiki/" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Deploy to Cloudflare Pages | |
| id: deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }} | |
| command: pages deploy --project-name=mtfwiki | |
| workingDirectory: apps/wiki | |
| packageManager: pnpm | |