File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,10 +2,9 @@ name: reusable-pr-preview
22
33on :
44 workflow_call :
5- inputs :
6- surge-token :
5+ secrets :
6+ TDESIGN_SURGE_TOKEN :
77 required : true
8- type : string
98
109jobs :
1110 preview-success :
3837 repository=${{github.repository}}
3938 project_name=${repository#*/}
4039 export DEPLOY_DOMAIN=https://preview-pr-${{ steps.pr.outputs.id }}-$project_name.surge.sh
41- npx surge --project ./_site --domain $DEPLOY_DOMAIN --token ${{ inputs.surge-token }}
40+ npx surge --project ./_site --domain $DEPLOY_DOMAIN --token ${{ secrets.TDESIGN_SURGE_TOKEN }}
4241 echo the preview URL is $DEPLOY_DOMAIN
4342 echo "url=$DEPLOY_DOMAIN" >> $GITHUB_OUTPUT
4443 - name : update status comment
Original file line number Diff line number Diff line change @@ -2,6 +2,13 @@ name: reusable-publish-npm
22
33on :
44 workflow_call :
5+ secrets :
6+ PERSONAL_TOKEN :
7+ required : false
8+
9+ TDESIGN_SURGE_TOKEN :
10+ required : true
11+
512 inputs :
613 node-version :
714 required : false
@@ -113,7 +120,7 @@ jobs:
113120 with :
114121 project : _site
115122 domain : ${{ steps.domain.outputs.domain }}
116- token : ${{ inputs.surge-token }}
123+ token : ${{ secrets.TDESIGN_SURGE_TOKEN }}
117124
118125 publish-official-website :
119126 runs-on : ubuntu-latest
@@ -123,7 +130,7 @@ jobs:
123130 with :
124131 ref : main
125132 fetch-depth : 0
126- token : ${{ inputs.token }}
133+ token : ${{ secrets.PERSONAL_TOKEN }}
127134 submodules : recursive
128135
129136 - name : update official website
You can’t perform that action at this time.
0 commit comments