Skip to content

Commit 3e7b554

Browse files
committed
change deploys to target the cartridge-infra repo
1 parent 8e83e7e commit 3e7b554

1 file changed

Lines changed: 5 additions & 33 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- 'src/**'
88
- 'package.json'
99
- 'package-lock.json'
10-
- 'deploy/**'
1110
- '.github/workflows/deploy.yml'
1211
workflow_dispatch:
1312

@@ -17,39 +16,12 @@ concurrency:
1716

1817
jobs:
1918
deploy:
20-
name: Deploy to Hetzner
19+
name: Trigger deploy via cartridge-infra
2120
runs-on: ubuntu-latest
2221
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
26-
- name: Install Ansible
27-
run: pip install ansible
28-
29-
- name: Setup SSH key
30-
env:
31-
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
22+
- name: Dispatch deploy-sync
3223
run: |
33-
mkdir -p ~/.ssh
34-
printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/deploy_key
35-
chmod 600 ~/.ssh/deploy_key
36-
ssh-keyscan -H 37.27.85.22 >> ~/.ssh/known_hosts
37-
38-
- name: Run Ansible playbook
39-
working-directory: deploy
24+
gh api repos/gamesgamesgamesgamesgames/cartridge-infra/dispatches \
25+
-f event_type=deploy-sync
4026
env:
41-
ANSIBLE_HOST_KEY_CHECKING: "false"
42-
ANSIBLE_PRIVATE_KEY_FILE: ~/.ssh/deploy_key
43-
run: |
44-
ansible-playbook playbook.yml \
45-
-e "twitch_client_id=${{ secrets.TWITCH_CLIENT_ID }}" \
46-
-e "twitch_client_secret=${{ secrets.TWITCH_CLIENT_SECRET }}" \
47-
-e "atproto_service=${{ secrets.ATPROTO_SERVICE }}" \
48-
-e "atproto_identifier=${{ secrets.ATPROTO_IDENTIFIER }}" \
49-
-e "atproto_password=${{ secrets.ATPROTO_PASSWORD }}" \
50-
-e "happyview_url=${{ secrets.HAPPYVIEW_URL }}" \
51-
-e "happyview_api_key=${{ secrets.HAPPYVIEW_API_KEY }}"
52-
53-
- name: Cleanup SSH key
54-
if: always()
55-
run: rm -f ~/.ssh/deploy_key
27+
GH_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }}

0 commit comments

Comments
 (0)