File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,9 +181,10 @@ static int FindFreePort(int startPort)
181181 }
182182 }
183183
184- var token = Environment . GetEnvironmentVariable ( "ACCESS_TOKEN" ) ;
184+ // Prefer the GitHub Actions-provided token in CI, then fall back to ACCESS_TOKEN.
185+ var token = GithubToken ;
185186 if ( string . IsNullOrEmpty ( token ) )
186- token = GithubToken ;
187+ token = Environment . GetEnvironmentVariable ( "ACCESS_TOKEN" ) ;
187188
188189 if ( string . IsNullOrEmpty ( token ) )
189190 {
@@ -237,9 +238,13 @@ static int FindFreePort(int startPort)
237238 . DependsOn ( CreateDeployBranch )
238239 . DependsOn ( Compile )
239240 . Executes ( ( ) => {
241+ var token = GithubToken ;
242+ if ( string . IsNullOrEmpty ( token ) )
243+ token = Environment . GetEnvironmentVariable ( "ACCESS_TOKEN" ) ;
244+
240245 Git ( "config --global user.name 'DNN Community'" ) ;
241246 Git ( "config --global user.email 'info@dnncommunity.org'" ) ;
242- Git ( $ "remote set-url origin https://{ organizationName } :{ GithubToken } @github.com/{ organizationName } /{ repositoryName } .git") ;
247+ Git ( $ "remote set-url origin https://{ organizationName } :{ token } @github.com/{ organizationName } /{ repositoryName } .git") ;
243248 Git ( "status" ) ;
244249 Git ( "add docs -f" ) ; // Force adding because it is usually gitignored.
245250 Git ( "status" ) ;
You can’t perform that action at this time.
0 commit comments