@@ -3,7 +3,7 @@ name: Continuous integration
3
3
on :
4
4
push :
5
5
branches :
6
- - BC-274-second-node
6
+ - master
7
7
8
8
concurrency : master
9
9
@@ -111,37 +111,27 @@ jobs:
111
111
if : ${{ env.CONTINUOUS_DEPLOYMENT_ENABLED == 'True' }}
112
112
run : |
113
113
mkdir -p ~/.ssh/
114
- echo "$DEPLOY_SSH_KEY_1" > ~/.ssh/github
115
- echo "$DEPLOY_SSH_KEY_2" >> ~/.ssh/github
114
+ echo "$DEPLOY_SSH_KEY" > ~/.ssh/github
116
115
chmod 600 ~/.ssh/github
117
116
cat >>~/.ssh/config <<END
118
- Host target_1
119
- HostName $DEPLOY_SSH_HOST_1
120
- User $DEPLOY_SSH_USER
121
- IdentityFile ~/.ssh/github
122
- LogLevel ERROR
123
- StrictHostKeyChecking no
124
- END
125
- Host target_2
126
- HostName $DEPLOY_SSH_HOST_2
117
+ Host target
118
+ HostName $DEPLOY_SSH_HOST
127
119
User $DEPLOY_SSH_USER
128
120
IdentityFile ~/.ssh/github
129
121
LogLevel ERROR
130
122
StrictHostKeyChecking no
131
123
END
132
124
env :
133
125
CONTINUOUS_DEPLOYMENT_ENABLED : ${{ secrets.NODE_CONTINUOUS_DEPLOYMENT_ENABLED }}
134
- DEPLOY_SSH_KEY_1 : ${{ secrets.NODE_DEPLOY_SSH_KEY_1 }}
135
- DEPLOY_SSH_KEY_2 : ${{ secrets.NODE_DEPLOY_SSH_KEY_2 }}
136
- DEPLOY_SSH_HOST_1 : ${{ secrets.NODE_DEPLOY_SSH_HOST_1 }}
137
- DEPLOY_SSH_HOST_2 : ${{ secrets.NODE_DEPLOY_SSH_HOST_2 }}
126
+ DEPLOY_SSH_KEY : ${{ secrets.NODE_DEPLOY_SSH_KEY }}
127
+ DEPLOY_SSH_HOST : ${{ secrets.NODE_DEPLOY_SSH_HOST }}
138
128
DEPLOY_SSH_USER : ${{ secrets.NODE_DEPLOY_SSH_USER }}
139
129
140
130
- name : Run deploy
141
131
# TODO(dmu) MEDIUM: Once/if github implements secrets on job level
142
132
# https://github.com/actions/runner/issues/520#issuecomment-877193387
143
133
if : ${{ env.CONTINUOUS_DEPLOYMENT_ENABLED == 'True' }}
144
134
run : |
145
- for variables in "target_1 ${{ secrets.NODE_RUN_GENESIS }}" "target_2 False"; do vars=($variables) && target=${vars[0]} && node_run_genesis=${vars[1]} && ssh $ target "docker system prune --all --volumes --force && wget https://raw.githubusercontent.com/thenewboston-developers/Node/master/scripts/deploy.sh -O /tmp/deploy-node.sh && chmod a+x /tmp/deploy-node.sh && /tmp/deploy-node.sh ${{ github.actor }} ${{ secrets.GITHUB_TOKEN }} $node_run_genesis && rm -f /tmp/deploy-node.sh"; done
135
+ ssh target "docker system prune --all --volumes --force && wget https://raw.githubusercontent.com/thenewboston-developers/Node/master/scripts/deploy.sh -O /tmp/deploy-node.sh && chmod a+x /tmp/deploy-node.sh && /tmp/deploy-node.sh ${{ github.actor }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.NODE_RUN_GENESIS }} && rm -f /tmp/deploy-node.sh"
146
136
env :
147
137
CONTINUOUS_DEPLOYMENT_ENABLED : ${{ secrets.NODE_CONTINUOUS_DEPLOYMENT_ENABLED }}
0 commit comments