{"id":28064,"date":"2025-04-19T22:41:11","date_gmt":"2025-04-19T14:41:11","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/28064.html"},"modified":"2025-04-19T22:41:11","modified_gmt":"2025-04-19T14:41:11","slug":"%e4%bd%bf%e7%94%a8github-actions%e5%ae%9e%e7%8e%b0git%e6%8e%a8%e9%80%81%e8%87%aa%e5%8a%a8%e9%83%a8%e7%bd%b2%e5%88%b0%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/28064.html","title":{"rendered":"\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668"},"content":{"rendered":"<p>                    <span style=\"color:#4d4d4d;,sans-serif,SimHei,SimSun;font-size:16px\">\u5c06\u7f51\u7ad9\u4e00\u952e\u90e8\u7f72\u5230\u670d\u52a1\u5668\u7684\u65b9\u6848\u5f88\u591a&#xff0c;\u6bd4\u5982\u7eafShell\u811a\u672c\u7ed3\u5408SSH\u3001Jenkins\u7b49\u5de5\u5177\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5229\u7528GitHub Actions\u8fd9\u4e00\u514d\u8d39\u4e14\u8f7b\u91cf\u7684CI\/CD\u5de5\u5177&#xff0c;\u5b9e\u73b0\u4ee3\u7801\u63a8\u9001\u540e\u81ea\u52a8\u90e8\u7f72\u5230\u4e91\u670d\u52a1\u5668\u3002<\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"image-20250314144041545\" height=\"799\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419144109-6803b605dd133.png\" width=\"1933\" \/><\/p>\n<p>\u4e4b\u524d\u4e00\u76f4\u5728\u4f7f\u7528github\u7684\u5de5\u4f5c\u6d41&#xff0c;\u786e\u5b9e\u662f\u4e00\u4e2a\u6bd4\u8f83\u597d\u7528\u7684\u5de5\u5177\u3002<\/p>\n<p>\u6211\u4e4b\u524d\u7528\u6765\u6784\u5efa\u516c\u5f00\u9759\u6001\u6587\u4ef6\u4ed3\u5e93&#xff0c;\u8ba9vercel\u6765\u7ba1\u7406\u9759\u6001\u7f51\u7ad9&#xff0c;\u8fd9\u6b21\u6211\u628a\u6240\u6709\u7684\u670d\u52a1\u90fd\u8fc1\u79fb\u5230\u4e86\u4e91\u670d\u52a1\u5668&#xff0c;\u6240\u4ee5\u6240\u6709\u7684\u90e8\u7f72\u90fd\u9700\u8981\u91cd\u65b0\u8c03\u6574\u4e00\u4e0b\u3002<\/p>\n<p>\u8fd8\u662f\u8001\u6837\u5b50&#xff0c;\u5148\u4ecb\u7ecd\u4e00\u4e0b\u6211\u7684\u573a\u666f\u548c\u914d\u7f6e\u3002<\/p>\n<h3>\u524d\u7f6e\u6761\u4ef6<\/h3>\n<ul>\n<li>\n<p>\u9879\u76ee\u7c7b\u578b: \u9759\u6001\u7f51\u7ad9&#xff08;\u793a\u4f8b\u4f7f\u7528Hexo&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u670d\u52a1\u5668\u73af\u5883: Linux\u7cfb\u7edf&#xff08;\u793a\u4f8b\u4e3aUbuntu&#xff09;<\/p>\n<\/li>\n<\/ul>\n<h3>\u670d\u52a1\u5668\u914d\u7f6e<\/h3>\n<h5>1. \u521b\u5efa\u4e13\u7528\u90e8\u7f72\u7528\u6237<\/h5>\n<p># \u521b\u5efa\u65b0\u7528\u6237<br \/>\nsudo adduser git &#8211;disabled-password<br \/>\n\u200b<br \/>\n# \u5207\u6362\u5230\u8be5\u7528\u6237<br \/>\nsudo su &#8211; git<br \/>\n\u200b<br \/>\n# \u521b\u5efa.ssh\u76ee\u5f55<br \/>\nmkdir -p ~\/.ssh &amp;&amp; chmod 700 ~\/.ssh <\/p>\n<h5>2. \u751f\u6210 SSH \u5bc6\u94a5\u5bf9<\/h5>\n<p># \u5728\u670d\u52a1\u5668\u751f\u6210\u5bc6\u94a5&#xff08;\u4e5f\u53ef\u672c\u5730\u751f\u6210\u540e\u4f20\u516c\u94a5&#xff09;<br \/>\nsudo ssh-keygen -t ed25519 -C &#034;github-actions-deploy-key&#034; -f ~\/.ssh\/github_actions <\/p>\n<h5>3. \u914d\u7f6e\u6388\u6743\u516c\u94a5<\/h5>\n<p># \u5c06\u516c\u94a5\u52a0\u5165\u6388\u6743\u5217\u8868<br \/>\nsudo sh -c &#039;cat \/home\/git\/.ssh\/github_actions.pub &gt;&gt; \/home\/git\/.ssh\/authorized_keys&#039;<br \/>\n\u200b<br \/>\n# \u8bbe\u7f6e\u6743\u9650<br \/>\nsudo chmod 600 ~\/.ssh\/authorized_keys<br \/>\nsudo chmod 644 ~\/.ssh\/github_actions.pub <\/p>\n<h5>4. \u76ee\u6807\u76ee\u5f55\u6743\u9650<\/h5>\n<p># \u5047\u8bbe\u90e8\u7f72\u76ee\u5f55\u4e3a \/var\/www\/blog<br \/>\nsudo mkdir -p \/var\/www\/blog<br \/>\nsudo chown -R deployer:deployer \/var\/www\/blog <\/p>\n<h5>5.\u83b7\u53d6private key<\/h5>\n<p>sudo cat ~\/.ssh\/github_actions <\/p>\n<p>\u6b63\u5e38\u60c5\u51b5\u4f1a\u8fd4\u56de\u8fd9\u6837\u7684\u6587\u672c&#xff1a;<\/p>\n<p>&#8212;&#8211;BEGIN OPENSSH PRIVATE KEY&#8212;&#8211;<br \/>\n&#8212;&#8211;END OPENSSH PRIVATE KEY&#8212;&#8211; <\/p>\n<h5>6.\u8c03\u6574ssh\u914d\u7f6e<\/h5>\n<p>\/etc\/ssh\/sshd_config<br \/>\n# \u542f\u7528\u5bc6\u94a5\u8ba4\u8bc1<br \/>\nPubkeyAuthentication yes \u00a0 \u00a0 \u00a0<br \/>\n# \u7981\u7528\u5bc6\u7801\u767b\u5f55<br \/>\nPasswordAuthentication no \u00a0 \u00a0 \u00a0<br \/>\n# \u5141\u8bb8\u90e8\u7f72\u7528\u6237<br \/>\nAllowUsers deployer \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<br \/>\nsudo systemctl restart ssh <\/p>\n<h5>\u5982\u679c\u9047\u5230\u6743\u9650\u95ee\u9898<\/h5>\n<p># \u5207\u6362\u5230root\u518d\u6267\u884c<br \/>\nchmod 700 ~git\/.ssh<br \/>\nchmod 600 ~git\/.ssh\/authorized_keys<br \/>\nchown -R git:git ~git\/.ssh<br \/>\n\u200b<br \/>\n# \u6700\u540e\u7684\u8def\u5f84\u8c03\u6574\u6210\u9759\u6001\u6587\u4ef6\u8def\u5f84<br \/>\nsudo chown -R git:git \/www\/wwwroot<br \/>\n\u200b<br \/>\nsudo setfacl -R -m u:git:rwx \/www\/wwwroot<br \/>\nsudo setfacl -Rd -m u:git:rwx \/www\/wwwroot <\/p>\n<h3>Github\u4ed3\u5e93\u914d\u7f6e<\/h3>\n<h4>1. \u6dfb\u52a0\u4ed3\u5e93\u5bc6\u94a5<\/h4>\n<li>\n<p>\u8bbf\u95ee\u4ed3\u5e93 Settings &gt; Secrets &gt; Actions<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb New repository secret<\/p>\n<\/li>\n<li>\n<p>\u8f93\u5165\u540d\u79f0 SERVER_SSH_KEY&#xff0c;\u503c\u7c98\u8d34\u524d\u6587\u83b7\u53d6\u7684\u79c1\u94a5\u5185\u5bb9<\/p>\n<\/li>\n<h4>2. \u914d\u7f6e\u5de5\u4f5c\u6d41\u6587\u4ef6<\/h4>\n<p>\u521b\u5efa .github\/workflows\/deploy.yml \u5185\u5bb9\u5982\u4e0b&#xff1a;<\/p>\n<p>name: Deploy Blog  # \u5de5\u4f5c\u6d41\u540d\u79f0&#xff0c;\u663e\u793a\u5728Actions\u9762\u677f<\/p>\n<p>on: [push]  # \u89e6\u53d1\u6761\u4ef6&#xff1a;\u4efb\u4f55git push\u64cd\u4f5c<\/p>\n<p>jobs:<br \/>\n  build:   # \u4efb\u52a1ID&#xff0c;\u53ef\u81ea\u5b9a\u4e49<br \/>\n    runs-on: ubuntu-latest  # \u4f7f\u7528GitHub\u6258\u7ba1\u7684Ubuntu\u8fd0\u884c\u5668<\/p>\n<p>    steps:<br \/>\n      &#8211; name: Checkout code  # \u6b65\u9aa41&#xff1a;\u62c9\u53d6\u4ed3\u5e93\u4ee3\u7801<br \/>\n        uses: actions\/checkout&#064;v4  # \u5b98\u65b9\u68c0\u51fa\u63d2\u4ef6<\/p>\n<p>      &#8211; name: Install and Build  # \u6b65\u9aa42&#xff1a;\u5b89\u88c5\u4f9d\u8d56\u5e76\u6784\u5efa<br \/>\n        run: |                   # \u591a\u884c\u547d\u4ee4\u6267\u884c\u5668<br \/>\n          npm install<br \/>\n          npm run build<\/p>\n<p>      &#8211; name: Deploy to Server  # \u6b65\u9aa43&#xff1a;\u90e8\u7f72\u5230\u670d\u52a1\u5668<br \/>\n        uses: easingthemes\/ssh-deploy&#064;main  # \u7b2c\u4e09\u65b9SSH\u90e8\u7f72\u63d2\u4ef6<br \/>\n        env:<br \/>\n          SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}  # \u4ece\u4ed3\u5e93\u5bc6\u94a5\u8bfb\u53d6\u79c1\u94a5<br \/>\n          REMOTE_HOST: &#034;&#034;  # \u670d\u52a1\u5668\u516c\u7f51IP\u6216\u57df\u540d<br \/>\n          REMOTE_USER: &#034;git&#034;  # \u6b65\u9aa41\u521b\u5efa\u7684\u7528\u6237<br \/>\n          SOURCE: &#034;public\/&#034;  # \u672c\u5730\u6784\u5efa\u8f93\u51fa\u76ee\u5f55<br \/>\n          TARGET: &#034;\/www\/wwwroot\/guoshunfa.com&#034;  # \u670d\u52a1\u5668\u76ee\u6807\u76ee\u5f55<br \/>\n          ARGS: &#034;-avz &#8211;chown&#061;git:git&#034;  # rsync\u53c2\u6570&#xff1a;\u5f52\u6863\u6a21\u5f0f\/\u538b\u7f29\/\u5220\u9664\u591a\u4f59\u6587\u4ef6 <\/p>\n<p>\u5230\u8fd9\u6240\u6709\u7684\u914d\u7f6e\u5c31\u7ed3\u675f\u4e86\u3002<\/p>\n<h3>\u9a8c\u8bc1\u6548\u679c<\/h3>\n<li>\n<p>\u672c\u5730\u4fee\u6539\u540e\u6267\u884cGit\u63a8\u9001&#xff1a;<\/p>\n<p> git add .<br \/>\ngit commit -m &#034;\u89e6\u53d1\u81ea\u52a8\u90e8\u7f72&#034;<br \/>\ngit push origin main <\/li>\n<li>\n<p>\u767b\u5f55GitHub\u4ed3\u5e93&#xff0c;\u8fdb\u5165 Actions \u6807\u7b7e\u9875\u67e5\u770b\u6267\u884c\u72b6\u6001<\/p>\n<\/li>\n<li>\n<p>\u6210\u529f\u5b8c\u6210\u540e&#xff0c;\u8bbf\u95ee\u670d\u52a1\u5668\u76ee\u6807\u76ee\u5f55\u786e\u8ba4\u6587\u4ef6\u66f4\u65b0<\/p>\n<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e29\u6b21\uff0c\u6536\u85cf20\u6b21\u3002\u5c06\u7f51\u7ad9\u4e00\u952e\u90e8\u7f72\u5230\u670d\u52a1\u5668\u7684\u65b9\u6848\u5f88\u591a\uff0c\u6bd4\u5982\u7eafShell\u811a\u672c\u7ed3\u5408SSH\u3001Jenkins\u7b49\u5de5\u5177\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5229\u7528GitHub Actions\u8fd9\u4e00\u514d\u8d39\u4e14\u8f7b\u91cf\u7684CI\/CD\u5de5\u5177\uff0c\u5b9e\u73b0\u4ee3\u7801\u63a8\u9001\u540e\u81ea\u52a8\u90e8\u7f72\u5230\u4e91\u670d\u52a1\u5668\u3002\u4e4b\u524d\u4e00\u76f4\u5728\u4f7f\u7528github\u7684\u5de5\u4f5c\u6d41\uff0c\u786e\u5b9e\u662f\u4e00\u4e2a\u6bd4\u8f83\u597d\u7528\u7684\u5de5\u5177\u3002\u6211\u4e4b\u524d\u7528\u6765\u6784\u5efa\u516c\u5f00\u9759\u6001\u6587\u4ef6\u4ed3\u5e93\uff0c\u8ba9vercel\u6765\u7ba1\u7406\u9759\u6001\u7f51\u7ad9\uff0c\u8fd9\u6b21\u6211\u628a\u6240\u6709\u7684\u670d\u52a1\u90fd\u8fc1\u79fb\u5230\u4e86\u4e91\u670d\u52a1\u5668\uff0c\u6240\u4ee5\u6240\u6709\u7684\u90e8\u7f72\u90fd\u9700\u8981\u91cd\u65b0\u8c03\u6574\u4e00\u4e0b\u3002\u8fd8\u662f\u8001\u6837\u5b50\uff0c\u5148\u4ecb\u7ecd\u4e00\u4e0b\u6211\u7684\u573a\u666f\u548c\u914d\u7f6e\u3002_github\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668<\/p>\n","protected":false},"author":2,"featured_media":28063,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[89,92,698,43],"topic":[],"class_list":["post-28064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-git","tag-github","tag-698","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/28064.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e29\u6b21\uff0c\u6536\u85cf20\u6b21\u3002\u5c06\u7f51\u7ad9\u4e00\u952e\u90e8\u7f72\u5230\u670d\u52a1\u5668\u7684\u65b9\u6848\u5f88\u591a\uff0c\u6bd4\u5982\u7eafShell\u811a\u672c\u7ed3\u5408SSH\u3001Jenkins\u7b49\u5de5\u5177\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5229\u7528GitHub Actions\u8fd9\u4e00\u514d\u8d39\u4e14\u8f7b\u91cf\u7684CI\/CD\u5de5\u5177\uff0c\u5b9e\u73b0\u4ee3\u7801\u63a8\u9001\u540e\u81ea\u52a8\u90e8\u7f72\u5230\u4e91\u670d\u52a1\u5668\u3002\u4e4b\u524d\u4e00\u76f4\u5728\u4f7f\u7528github\u7684\u5de5\u4f5c\u6d41\uff0c\u786e\u5b9e\u662f\u4e00\u4e2a\u6bd4\u8f83\u597d\u7528\u7684\u5de5\u5177\u3002\u6211\u4e4b\u524d\u7528\u6765\u6784\u5efa\u516c\u5f00\u9759\u6001\u6587\u4ef6\u4ed3\u5e93\uff0c\u8ba9vercel\u6765\u7ba1\u7406\u9759\u6001\u7f51\u7ad9\uff0c\u8fd9\u6b21\u6211\u628a\u6240\u6709\u7684\u670d\u52a1\u90fd\u8fc1\u79fb\u5230\u4e86\u4e91\u670d\u52a1\u5668\uff0c\u6240\u4ee5\u6240\u6709\u7684\u90e8\u7f72\u90fd\u9700\u8981\u91cd\u65b0\u8c03\u6574\u4e00\u4e0b\u3002\u8fd8\u662f\u8001\u6837\u5b50\uff0c\u5148\u4ecb\u7ecd\u4e00\u4e0b\u6211\u7684\u573a\u666f\u548c\u914d\u7f6e\u3002_github\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/28064.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-19T14:41:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419144109-6803b605dd133.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/28064.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/28064.html\",\"name\":\"\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-19T14:41:11+00:00\",\"dateModified\":\"2025-04-19T14:41:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/28064.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/28064.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/28064.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/28064.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e29\u6b21\uff0c\u6536\u85cf20\u6b21\u3002\u5c06\u7f51\u7ad9\u4e00\u952e\u90e8\u7f72\u5230\u670d\u52a1\u5668\u7684\u65b9\u6848\u5f88\u591a\uff0c\u6bd4\u5982\u7eafShell\u811a\u672c\u7ed3\u5408SSH\u3001Jenkins\u7b49\u5de5\u5177\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5229\u7528GitHub Actions\u8fd9\u4e00\u514d\u8d39\u4e14\u8f7b\u91cf\u7684CI\/CD\u5de5\u5177\uff0c\u5b9e\u73b0\u4ee3\u7801\u63a8\u9001\u540e\u81ea\u52a8\u90e8\u7f72\u5230\u4e91\u670d\u52a1\u5668\u3002\u4e4b\u524d\u4e00\u76f4\u5728\u4f7f\u7528github\u7684\u5de5\u4f5c\u6d41\uff0c\u786e\u5b9e\u662f\u4e00\u4e2a\u6bd4\u8f83\u597d\u7528\u7684\u5de5\u5177\u3002\u6211\u4e4b\u524d\u7528\u6765\u6784\u5efa\u516c\u5f00\u9759\u6001\u6587\u4ef6\u4ed3\u5e93\uff0c\u8ba9vercel\u6765\u7ba1\u7406\u9759\u6001\u7f51\u7ad9\uff0c\u8fd9\u6b21\u6211\u628a\u6240\u6709\u7684\u670d\u52a1\u90fd\u8fc1\u79fb\u5230\u4e86\u4e91\u670d\u52a1\u5668\uff0c\u6240\u4ee5\u6240\u6709\u7684\u90e8\u7f72\u90fd\u9700\u8981\u91cd\u65b0\u8c03\u6574\u4e00\u4e0b\u3002\u8fd8\u662f\u8001\u6837\u5b50\uff0c\u5148\u4ecb\u7ecd\u4e00\u4e0b\u6211\u7684\u573a\u666f\u548c\u914d\u7f6e\u3002_github\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668","og_url":"https:\/\/www.wsisp.com\/helps\/28064.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-19T14:41:11+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419144109-6803b605dd133.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/28064.html","url":"https:\/\/www.wsisp.com\/helps\/28064.html","name":"\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-19T14:41:11+00:00","dateModified":"2025-04-19T14:41:11+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/28064.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/28064.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/28064.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528GitHub Actions\u5b9e\u73b0Git\u63a8\u9001\u81ea\u52a8\u90e8\u7f72\u5230\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/28064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=28064"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/28064\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/28063"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=28064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=28064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=28064"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=28064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}