Forráskód Böngészése

Fix auto sync demo workflow

杜府 3 éve
szülő
commit
19ce92d7aa
1 módosított fájl, 8 hozzáadás és 5 törlés
  1. 8 5
      .github/workflows/auto-sync-demo.yml

+ 8 - 5
.github/workflows/auto-sync-demo.yml

@@ -16,11 +16,14 @@ jobs:
             - name: Checkout
               uses: actions/checkout@v2
 
-            # 1. clone 仓库 github.com/dufu1991/stdf
-            - name: Clone stdf
-              run: |
-                  git clone git@github.com:dufu1991/stdf.git
-
+            # 1. clone 仓库 github.com/dufu1991/stdf,使用 secrets.STDF_GITHUB_TOKEN
+            - name: Clone stdf 
+                uses: actions/checkout@v3
+                with:
+                    repository: dufu1991/stdf
+                    token: ${{ secrets.STDF_GITHUB_TOKEN }}
+                    path: stdf
+                    
             # 2. cd 到 stdf 仓库的 demo 文件内,初始化本地仓库
             #    将 demo/src/App.svelte 文件内的 ../../components 替换为 stdf
             #    将 demo/src/pages 目录下的所有子孙 .svelte 文件内的 ../../../../components 替换为 stdf