部署改寫為 Workers(僅靜態資產) - #42
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原因:Cloudflare 已把 Workers 與 Pages 整合為同一流程,「Pages」是舊名稱。
#41 剛把〈部署〉從錯的
(nginx)改成舊的(Pages),這一條改成現況。
結果:Workers,僅靜態資產。主控臺的建置設定為組建命令
npm run build、部署命令
npx wrangler deploy、根目錄/、生產分支main。理由:只部署靜態資產,與舊 Pages 無行為差異;但記錄要用現況的名稱,
而且實際的兩行命令比「由 Pages 自己建置」有用——
wrangler.jsonc正是為這個組建引入的,由建置環境的
npx wrangler deploy讀取。.hoshi-build.yaml的註解一併改名。驗證:hoshi test通過。