make a new menu and optimize socket communication #160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Configure SSH | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$SSH_KEY" | base64 -d > ~/.ssh/staging.key | |
echo $SSH_HOST | |
echo $SSH_USER | |
chmod 600 ~/.ssh/staging.key | |
cat >>~/.ssh/config <<END | |
Host staging | |
HostName $SSH_HOST | |
User $SSH_USER | |
IdentityFile ~/.ssh/staging.key | |
StrictHostKeyChecking no | |
END | |
env: | |
SSH_USER: ${{ secrets.STAGING_SSH_USER }} | |
SSH_KEY: ${{ secrets.STAGING_SSH_KEY }} | |
SSH_HOST: ${{ secrets.STAGING_SSH_HOST }} | |
- name: deploy | |
env: | |
SSH_HOST: ${{ secrets.STAGING_SSH_HOST }} | |
run: | | |
ssh staging " | |
cd system | |
git fetch --all | |
git reset --hard origin/main | |
" | |
- name: fetch-system | |
run: | | |
ssh staging ' | |
cd dialectics | |
git pull | |
' | |
- name: start | |
run: | | |
ssh staging ' | |
cd system | |
make clean-states start | |
' | |