当前位置:网站首页>Coding website hosting migration Tencent cloud cloud development webify

Coding website hosting migration Tencent cloud cloud development webify

2022-06-23 21:29:00 Made by yuange

0x00. Preface

Talk about your blog, It was built when I was in college , The source code is naturally put in gh On , Then turn it on in the settings Pages I can get it blog Internet access links for . After all, static pages do not require any computing environment , As long as it is a cloud service that can host web pages . At the beginning, it was still local hexo g Generate page , And then public Folder git push To gh On . Later I learned to use Travis-CI Continuous integration to run hexo g, So you don't have to be local anymore hexo g 了 , Only need to .md Format article git push Go to the warehouse ,Travis-CI It will start Run get up , But it is free after all Travis-CI,SLA Not particularly high , Sometimes you will encounter a task that has been pushed for half a day or is still pending state , It has been queuing up to affect the use experience …… later gh Launched Actions, Decisive will Travis-CI Moved to Actions, After all, it is a native service, although I was not used to it when I first started , But write according to various examples .yml The document was soon done .

Last , because gh Pages The reason why the managed servers are overseas , The speed of domestic visits is not ideal , At this time, I see that there are similar code platforms in China , It also provides hosting services , Yes, that's right coding.net, Tell the truth coding I really have a conscience , Static hosting has never cost money , The initial hosting server was in HK, The speed of mainland visits is really good , Web hosting was upgraded several times later , In fact, it's also a matter of changing the soup without changing the dressing , In a more friendly and customized way , Finally, upgrade to Tencent cloud serverless Source code in COS There are also domestic CDN Speed up , Until recently, I saw the announcement that the service would be officially stopped ……

Due to product strategy adjustment ,CODING Website hosting will be on 2021 year 12 month 30 Japan Officially out of service , It is recommended that you use Tencent cloud for Web Application hosting platform created by developers - 「 Development of cloud Webify」

Although it has changed to Tencent cloud development Webify, But also for developers 「Webify Personal site support plan 」, Then you can safely migrate

0x01. Use

So don't say much , Go straight to the topic and start moving , First enter your cloud 「Web App hosting 」 In the console

Click new app

Use here from gh Import , choice blog The warehouse where you are , Import

blog Or based on the cliche hexo, Automatically recognize that the frame preset is Hexo, There is no need to modify the build related parameters , Deploy the application

Confirm creation

then , Deployment error , Can you see or coding Of Jenkins That plan

[2021-12-23 21:31:45]
Thu Dec 23 2021 13:31:44 GMT+0000 (Coordinated Universal Time) 29.6 CloudBase Framework::info running 'npx hexo generate'
[2021-12-23 21:31:46]
INFO Add lazy load attribute to all post
[2021-12-23 21:31:46]
INFO Add fallback lazy load using lazysizes
[2021-12-23 21:31:46]
INFO Start processing
[2021-12-23 21:31:47]
Version 9 of Highlight.js has reached EOL and is no longer supported.
[2021-12-23 21:31:47]
Please upgrade or ask whatever dependency you are using to upgrade.
[2021-12-23 21:31:47]
https://github.com/highlightjs/highlight.js/issues/2877
[2021-12-23 21:31:48]
Thu Dec 23 2021 13:31:48 GMT+0000 (Coordinated Universal Time) 33.1 CloudBase Framework::error (node:168) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
[2021-12-23 21:31:48]
(Use `node --trace-warnings ...` to show where the warning was created)
[2021-12-23 21:31:48]
(node:168) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
[2021-12-23 21:31:48]
(node:168) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
[2021-12-23 21:31:48]
(node:168) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
[2021-12-23 21:31:48]
(node:168) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
[2021-12-23 21:31:48]
(node:168) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
[2021-12-23 21:31:48]
fatal: not a git repository (or any of the parent directories): .git
[2021-12-23 21:31:48]
fatal: not a git repository (or any of the parent directories): .git
[2021-12-23 21:31:48]
fatal: not a git repository (or any of the parent directories): .git
[2021-12-23 21:31:48]
fatal: not a git repository (or any of the parent directories): .git
[2021-12-23 21:31:48]
fatal: not a git repository (or any of the parent directories): .git
……
[2021-12-23 21:31:48]
fatal: not a git repository (or any of the parent directories): .git
[2021-12-23 21:31:48]
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
[2021-12-23 21:31:48]
Error: Command failed: git log --follow -1 --format="%ad" -- /root/cloudbase-workspace/source/_posts/she.md
[2021-12-23 21:31:48]
fatal: not a git repository (or any of the parent directories): .git
[2021-12-23 21:31:48]
[2021-12-23 21:31:48]
at checkExecSyncError (child_process.js:760:11)
[2021-12-23 21:31:48]
at execSync (child_process.js:833:15)
[2021-12-23 21:31:48]
at getUpdated (/root/cloudbase-workspace/node_modules/hexo-filter-date-from-git/index.js:37:19)
[2021-12-23 21:31:48]
at Hexo.<anonymous> (/root/cloudbase-workspace/node_modules/hexo-filter-date-from-git/index.js:17:22)
[2021-12-23 21:31:48]
at Hexo.tryCatcher (/root/cloudbase-workspace/node_modules/bluebird/js/release/util.js:16:23)
[2021-12-23 21:31:48]
at Hexo.<anonymous> (/root/cloudbase-workspace/node_modules/bluebird/js/release/method.js:15:34)
[2021-12-23 21:31:48]
at /root/cloudbase-workspace/node_modules/hexo/lib/extend/filter.js:62:52
[2021-12-23 21:31:48]
at tryCatcher (/root/cloudbase-workspace/node_modules/bluebird/js/release/util.js:16:23)
[2021-12-23 21:31:48]
at Object.gotValue (/root/cloudbase-workspace/node_modules/bluebird/js/release/reduce.js:166:18)
[2021-12-23 21:31:48]
at Object.gotAccum (/root/cloudbase-workspace/node_modules/bluebird/js/release/reduce.js:155:25)
[2021-12-23 21:31:48]
at Object.tryCatcher (/root/cloudbase-workspace/node_modules/bluebird/js/release/util.js:16:23)
[2021-12-23 21:31:48]
at Promise._settlePromiseFromHandler (/root/cloudbase-workspace/node_modules/bluebird/js/release/promise.js:547:31)
[2021-12-23 21:31:48]
at Promise._settlePromise (/root/cloudbase-workspace/node_modules/bluebird/js/release/promise.js:604:18)
[2021-12-23 21:31:48]
at Promise._settlePromise0 (/root/cloudbase-workspace/node_modules/bluebird/js/release/promise.js:649:10)
[2021-12-23 21:31:48]
at Promise._settlePromises (/root/cloudbase-workspace/node_modules/bluebird/js/release/promise.js:729:18)
[2021-12-23 21:31:48]
at _drainQueueStep (/root/cloudbase-workspace/node_modules/bluebird/js/release/async.js:93:12)
[2021-12-23 21:31:48]
at _drainQueue (/root/cloudbase-workspace/node_modules/bluebird/js/release/async.js:86:9)
[2021-12-23 21:31:48]
at Async._drainQueues (/root/cloudbase-workspace/node_modules/bluebird/js/release/async.js:102:5)
[2021-12-23 21:31:48]
at Immediate.Async.drainQueues [as _onImmediate] (/root/cloudbase-workspace/node_modules/bluebird/js/release/async.js:15:14)
[2021-12-23 21:31:48]
at processImmediate (internal/timers.js:464:21)

What's wrong is fatal: not a git repository(or any of the parent directories):.git, Confirm to hexo-filter-date-from-git This plugin , It will be based on git To update the last update timestamp in the article , But it seems that this place is not git The warehouse of , That's why I made a mistake ……

And you can see there's another git add The operation of

[2021-12-23 21:31:06]+ cd cloudbase-workspace-private
[2021-12-23 21:31:06]+ git config --global user.email [email protected]
[2021-12-23 21:31:06]+ git config --global user.name tcb
[2021-12-23 21:31:06]+ git add .
[2021-12-23 21:31:06]+ git commit -a -m init

Then there will be no more in the back .git Folder , No wonder the error report is not git The warehouse of

[2021-12-23 21:31:14]+ cd /root/cloudbase-workspace//
[2021-12-23 21:31:14]+ pwd
[2021-12-23 21:31:14]/root/cloudbase-workspace
[2021-12-23 21:31:14]+ ls -al
[2021-12-23 21:31:14]total 556
[2021-12-23 21:31:14]drwxr-xr-x 6 root root 4096 Dec 23 13:31 .
[2021-12-23 21:31:14]drwx------ 1 root root 4096 Dec 23 13:31 ..
[2021-12-23 21:31:14]drwxr-xr-x 3 root root 4096 Dec 23 13:31 .github
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 90 Dec 23 13:31 .gitignore
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 111 Dec 23 13:31 .gitmodules
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 572 Dec 23 13:31 Jenkinsfile
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 855 Dec 23 13:31 README.md
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 2671 Dec 23 13:31 _config.yml
[2021-12-23 21:31:14]drwxr-xr-x 2 root root 4096 Dec 23 13:31 api
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 403 Dec 23 13:31 deploy.sh
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 508200 Dec 23 13:31 package-lock.json
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 969 Dec 23 13:31 package.json
[2021-12-23 21:31:14]drwxr-xr-x 5 root root 4096 Dec 23 13:31 source
[2021-12-23 21:31:14]drwxr-xr-x 3 root root 4096 Dec 23 13:31 themes
[2021-12-23 21:31:14]-rw-r--r-- 1 root root 2 Dec 23 13:31 vercel.json

Here first mark once , It's time to give feedback , Update the article after the feedback results come out

2021-12-24 20:34:40: The feedback result says that it will be optimized in the future

Before waiting for the optimization to finish , A separate branch is opened to remove hexo-filter-date-from-git plug-in unit , As a result, it is found that branches cannot be selected when creating new applications ……

You have to give feedback (

原网站

版权声明
本文为[Made by yuange]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/12/202112232253491906.html