Merge pull request #23 from COSCUP/feat/optimize_reply #5
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 to Server | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: polyhistor_deploy_setting | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.POLYHISTOR_PRIVATE_KEY }} | |
- name: Deploy to server | |
env: | |
SSH_HOST: ${{ secrets.POLYHISTOR_SSH_HOST }} | |
SSH_USER: ${{ secrets.POLYHISTOR_SSH_USER }} | |
SSH_PORT: ${{ secrets.POLYHISTOR_SSH_PORT }} | |
run: | | |
ssh -o StrictHostKeyChecking=no -p $SSH_PORT $SSH_USER@$SSH_HOST << 'EOF' | |
cd polyhistor | |
git pull origin main | |
chmod +x deploy.sh | |
./deploy.sh | |
EOF |