File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 required : false
1818 type : string
1919
20- env :
21- # 在 GitHub 项目源码仓库 → 项目的 Settings → Secrets(Actions 里的 Repository secrets) 里提前建好以下变量
22- HUAWEI_CLOUD_AK : ${{ secrets.HUAWEI_CLOUD_AK }}
23- HUAWEI_CLOUD_SK : ${{ secrets.HUAWEI_CLOUD_SK }}
24- HUAWEI_CLOUD_ENDPOINT : ${{ secrets.HUAWEI_CLOUD_ENDPOINT }}
25- HUAWEI_CLOUD_BUCKET : ${{ secrets.HUAWEI_CLOUD_BUCKET }}
26-
2720permissions :
2821 contents : read
2922 pages : write
@@ -111,11 +104,11 @@ jobs:
111104 - name : Upload to OBS
112105 run : |
113106 # 一次性配置 AK/SK/endpoint
114- obsutil config -i=${{ env .HUAWEI_CLOUD_AK }} \
115- -k=${{ env .HUAWEI_CLOUD_SK }} \
116- -e=${{ env .HUAWEI_CLOUD_ENDPOINT }}
107+ obsutil config -i=${{ secrets .HUAWEI_CLOUD_AK }} \
108+ -k=${{ secrets .HUAWEI_CLOUD_SK }} \
109+ -e=${{ secrets .HUAWEI_CLOUD_ENDPOINT }}
117110
118111 # 把本地 dist/ 目录整站同步到桶根目录
119112 echo "needs.build.outputs.version: ${{ needs.build.outputs.version }}"
120113 mv dist ${{ needs.build.outputs.version }}
121- obsutil cp ${{ needs.build.outputs.version }} obs://${{ env .HUAWEI_CLOUD_BUCKET }}/opentiny-docs/ -r -f
114+ obsutil cp ${{ needs.build.outputs.version }} obs://${{ secrets .HUAWEI_CLOUD_BUCKET }}/opentiny-docs/ -r -f
You can’t perform that action at this time.
0 commit comments