<kbd id="9plqc"><label id="9plqc"></label></kbd>

        <th id="9plqc"></th>
        1. <center id="9plqc"><video id="9plqc"></video></center>
          <sub id="9plqc"><form id="9plqc"><pre id="9plqc"></pre></form></sub>
          <nav id="9plqc"><form id="9plqc"><legend id="9plqc"></legend></form></nav>
          Github pages 同步到Gitee pages 并自動(dòng)更新Gitee pages 您所在的位置:網(wǎng)站首頁(yè) 屬鼠住什么方位房間 Github pages 同步到Gitee pages 并自動(dòng)更新Gitee pages

          Github pages 同步到Gitee pages 并自動(dòng)更新Gitee pages

          #Github pages 同步到Gitee pages 并自動(dòng)更新Gitee pages| 來(lái)源: 網(wǎng)絡(luò)整理| 查看: 265

          由于 Gitee Pages 的訪問(wèn)速度很快,很多朋友會(huì)選擇 Gitee Pages 部署項(xiàng)目(如:個(gè)人博客、開(kāi)源項(xiàng)目國(guó)內(nèi)鏡像站點(diǎn))。但是它不像 GitHub Pages 那樣,一提交代碼就能自動(dòng)更新 Pages,因?yàn)?Gitee 的自動(dòng)部署屬于 Gitee Pages Pro 的服務(wù)。

          有大佬開(kāi)發(fā)了自動(dòng)更新Gitee pages的action,其中也包含了github 同步到gitee 的代碼,詳見(jiàn):https://github.com/yanglbme/gitee-pages-action

          但有時(shí)候我想在同步之前對(duì)代碼做些處理,比如替換github.io的鏈接,但是保持此github倉(cāng)庫(kù)不變,就需要自己寫(xiě)同步代碼了,我寫(xiě)好的代碼如下: 注意:需要在倉(cāng)庫(kù)的settings(不是賬號(hào)的settings) => secrets/action ,添加New repository secret ,名字是GITEE_TOKEN, 值就是gitee token

          name: Github 同步到 Gitee # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the main branch push: branches: [ master ] #pull_request: # branches: [ main ] #schedule: #- cron: '30 0/3 * * *' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: run: name: 把該倉(cāng)庫(kù)同步到 Gitee(使用白名單只同步這個(gè)倉(cāng)庫(kù)) runs-on: ubuntu-latest steps: # - name: Mirror Github to Gitee with white list # uses: Yikun/hub-mirror-action@master # with: # src: github/nmy # dst: gitee/nmy # dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} # dst_token: ${{ secrets.GITEE_TOKEN }} # mappings: "nmy.github.io=>nmy" # static_list: "nmy.github.io" # force_update: true # debug: true - name: Mirror Github to Gitee with white list env: GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }} run: | git config --global user.email [email protected] git config --global user.name nmy git clone https://github.com/nmy/nmy.github.io.git ls -al mv nmy.github.io nmy && cd nmy pwd find . -type f | xargs sed -i "s/nmy.github.io/nmy.gitee.io/g" git add . git commit -m "update" -a git push --force --quiet https://nmy:"$GITEE_TOKEN"@gitee.com/nmy/nmy.git master:master


          【本文地址】

          公司簡(jiǎn)介

          聯(lián)系我們

          今日新聞

          推薦新聞

          專(zhuān)題文章
            CopyRight 2018-2019 實(shí)驗(yàn)室設(shè)備網(wǎng) 版權(quán)所有
            黄色免费网站在线看,韩国精品在线观看,韩国美女一区二区,99国产热 承德市| 如东县| 昌宁县| 武义县| 凉城县| 长泰县| 镇原县| 澎湖县| 宜兰县| 丁青县| 英德市| 钟祥市| 连江县| 沧州市| 确山县| 南宫市| 南丹县| 平顺县| 富顺县| 溧阳市| 嘉义市| 延寿县| 长宁县| 彰化县| 朝阳市| 怀集县| 苗栗市| 察哈| 历史| 阳信县| 师宗县| 靖宇县| 玉屏| 斗六市| 独山县| 板桥市| 潮州市| 沛县| 华池县| 济宁市| 滕州市| http://444 http://444 http://444 http://444 http://444 http://444