Skip to content

Commit

Permalink
trying deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Sep 19, 2023
1 parent 61fedd9 commit be0a863
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 25 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,21 @@ jobs:
- name: "test"
run: caps --ci

- run: cr --emit-ir -1
- run: cr --emit-js -1

- run: mkdir -p dist-server && cp -r {package.json,main.mjs,js-out,yarn.lock} dist-server/

- name: Upload server script
id: deploy-server
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.rsync_private_key}}
with:
flags: '-avzr --progress'
options: ''
ssh_options: ''
src: 'dist-server/*'
dest: '[email protected]:/servers/cos-up/'

- name: Display status from deploy
run: echo "${{ steps.deploy-server.outputs.status }}"
60 changes: 37 additions & 23 deletions calcit.cirru

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion compact.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
defn main! ()
println "\"COS get" $ .-getAuthorization COS
skir/create-server! on-request! $ {}
:port $ js/parseInt (get-env "\"PORT" "\"4000")
|on-request! $ %{} :CodeEntry (:doc |)
:code $ quote
defn on-request! (req-data res)
Expand All @@ -68,7 +69,7 @@
= (:user body) (:user secrets)
= (:pass body) (:pass-md5 secrets)
handle-token (:bucket secrets) (:app-id secrets) (:secret secrets) (:file-key body) cb
{} (:code 403) (:message "\"Not user")
cb $ {} (:code 403) (:message "\"Not user")
:headers $ {}
:body $ {} (:message "\"not open for all users...")
if
Expand Down

0 comments on commit be0a863

Please sign in to comment.