Skip to content

Commit

Permalink
Merge branch '287-voting' of github.com:DecentralCardGame/frontend in…
Browse files Browse the repository at this point in the history
…to 287-voting
  • Loading branch information
lxgr-linux committed Mar 31, 2024
2 parents 982af87 + f27aa2f commit 3309f6e
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/test_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,11 @@ jobs:
}}

steps:
- name: exit
if: ${{ env.LABEL == 'none' }}
- name: install liefer
if: ${{ env.LABEL != 'none' }}
run: |
exit 1
- name: install ssh keys
# check this thread to understand why its needed:
# https://stackoverflow.com/a/70447517
go install github.com/lxgr-linux/liefer@latest
- name: deploy
if: ${{ env.LABEL != 'none' }}
run: |
echo env.tag_name
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.LXGR_DEPLOY_PRIV }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.LXGR_HOST }} > ~/.ssh/known_hosts
- name: connect and pull
run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git checkout . && git fetch && git checkout ${{ github.event.pull_request.head.ref }} && git pull && npm i && npm run build && chgrp -R www-data ~/$LABEL && exit"
- name: cleanup
run: rm -rf ~/.ssh
~/go/bin/liefer deliver $LABEL ${{ github.event.pull_request.head.ref }} ${{ secrets.LIEFER_PRIVKEY }} --address ${{ secrets.LXGR_HOST }}:8080

0 comments on commit 3309f6e

Please sign in to comment.