diff --git a/Settings.hs b/Settings.hs index 2aa7e48..1378aff 100644 --- a/Settings.hs +++ b/Settings.hs @@ -89,6 +89,7 @@ data AppSettings = AppSettings , appAutoOpening :: Bool , appLeaderboardStyle :: LeaderboardStyle , appNewBestResultSlackHook :: Maybe Text + , appServerSSHPublicKey :: Maybe Text } instance FromJSON AppSettings where @@ -130,6 +131,8 @@ instance FromJSON AppSettings where appNewBestResultSlackHook <- o .:? "new-best-result-slack-hook" + appServerSSHPublicKey <- o .:? "server-ssh-public-key" + return AppSettings {..} -- | Settings for 'widgetFile', such as which template languages to support and diff --git a/config/settings.yml b/config/settings.yml index 7ae59fc..ba743b8 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -14,6 +14,7 @@ tag-permissions: "_env:TAG_PERMISSIONS:only-admin-can-add-new-tags" auto-opening: "_env:AUTO_OPENING:false" leaderboard-style: "_env:LEADERBOARD_STYLE:by-submitter" new-best-result-slack-hook: "_env:NEW_BEST_RESULT_SLACK_HOOK:" +server-ssh-public-key: "_env:SERVER_SSH_PUBLIC_KEY:" # Optional values with the following production defaults. # In development, they default to the inverse. diff --git a/templates/challenge-how-to.hamlet b/templates/challenge-how-to.hamlet index dc73124..38c5bc9 100644 --- a/templates/challenge-how-to.hamlet +++ b/templates/challenge-how-to.hamlet @@ -54,7 +54,17 @@ $case (appRepoScheme settings) cd #{challengeName challenge} git pull #{appRepoHost settings}#{challengeName challenge} -

(Alternatively, you can use any other Git repo, e.g. GitLab, make sure Gonito.net has access to your repo.) +

Using an external repository + + $maybe serverPubKey <- (appServerSSHPublicKey settings) +

Alternatively, you can use any other Git repo, e.g. GitLab, GitHub or your own repo, make sure Gonito.net has access to your repo, either by making it public or giving read access to the SSH public key: +

+      #{serverPubKey}
+  $nothing
+    

Alternatively, you can use any other Git repo, e.g. GitLab, GitHub or your own repo, make sure Gonito.net has access to your repo. + +

(And initiate it with #{appRepoHost settings}#{challengeName challenge}.) + $of Branches

Clone the repo: