Prefer GH actions data when constructing upstream URL.
This commit is contained in:
parent
18f481aa61
commit
6fb3662ee6
1 changed files with 28 additions and 24 deletions
18
.github/actions/build-docs/upload.ros
vendored
18
.github/actions/build-docs/upload.ros
vendored
|
@ -92,12 +92,7 @@ behaviour could be overriden by keyword argument ``:raise t``."
|
|||
|
||||
|
||||
(defun get-origin-to-push ()
|
||||
(let ((upstream (get-git-upstream)))
|
||||
|
||||
(cond
|
||||
(upstream
|
||||
;; If there is already some remote upstream, then use it
|
||||
(run (concatenate 'string "git remote get-url " upstream)))
|
||||
;; If we are running inside github actions
|
||||
((uiop:getenv "GITHUB_ACTIONS")
|
||||
(unless (uiop:getenv "GITHUB_TOKEN")
|
||||
|
@ -108,7 +103,7 @@ behaviour could be overriden by keyword argument ``:raise t``."
|
|||
(uiop:getenv "GITHUB_TOKEN")
|
||||
(uiop:getenv "GITHUB_REPOSITORY")))
|
||||
;; otherwise make it from travis secret token and repo slug
|
||||
(t
|
||||
((uiop:getenv "TRAVIS_REPO_SLUG")
|
||||
(let ((repo-slug (uiop:getenv "TRAVIS_REPO_SLUG"))
|
||||
(repo-token (uiop:getenv "GH_REPO_TOKEN")))
|
||||
|
||||
|
@ -118,7 +113,16 @@ behaviour could be overriden by keyword argument ``:raise t``."
|
|||
|
||||
(format nil "https://~A@github.com/~A"
|
||||
repo-token
|
||||
repo-slug))))))
|
||||
repo-slug)))
|
||||
;; If there is already some remote upstream, then use it
|
||||
(t
|
||||
(let ((upstream (get-git-upstream)))
|
||||
(cond
|
||||
(upstream
|
||||
(run (concatenate 'string "git remote get-url " upstream)))
|
||||
(t
|
||||
(log:error "Unable to guess correct upstream URL")
|
||||
(values nil)))))))
|
||||
|
||||
|
||||
(defun push-gh-pages (docs-dir)
|
||||
|
|
Loading…
Reference in a new issue