aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
blob: dcb082eb1d1faa8622b00a2926f2525163df8e27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
name: remote ssh command
on: [push]
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: executing remote ssh commands using ssh key
        uses: appleboy/ssh-action@master
        with:
          host: ${{ secrets.HOST }}
          username: ${{ secrets.USERNAME }}
          key: ${{ secrets.KEY_ED25519 }}
          port: ${{ secrets.PORT }}
          script: |
            # if [ -z "$GEMINI_API_KEY" ]; then
            #   export GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }}
            # fi
            # Add to /home/ubuntu/.shifooenv
            grep -qxF 'GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }}' /home/ubuntu/.shifooenv || echo 'GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }}' >> /home/ubuntu/.shifooenv
            cat /home/ubuntu/deploy.sh
            sh /home/ubuntu/deploy.sh