Skip to content

Commit

Permalink
Update github workflows
Browse files Browse the repository at this point in the history
Now we use webhooks instead of ssh
  • Loading branch information
KirillSmirnov committed Aug 23, 2024
1 parent b1c242c commit 81bbce7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/deploy_to_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ jobs:
runs-on: ubuntu-latest
environment: deploy_environment
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run deploy on server
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSHKEY }}
script:
- name: Run deploy on production server
env:
AUTHKEY: ${{ secrets.XSEAUTH }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run: |
curl -X POST -H "X-SE-Auth: $AUTHKEY" $WEBHOOK_URL
14 changes: 5 additions & 9 deletions .github/workflows/deploy_to_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ jobs:
runs-on: ubuntu-latest
environment: deploy_environment
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run deploy on staging server
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME2 }}
key: ${{ secrets.SSHKEY }}
script:
env:
AUTHKEY: ${{ secrets.XSEAUTH }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL_STAGING }}
run: |
curl -X POST -H "X-SE-Auth: $AUTHKEY" $WEBHOOK_URL

0 comments on commit 81bbce7

Please sign in to comment.