Skip to content

Commit

Permalink
ci: add deploy workflow (#23)
Browse files Browse the repository at this point in the history
* ci: add deploy workflow
* ci: update deploy.yaml
  • Loading branch information
ahonn authored Mar 29, 2024
1 parent 9caa22b commit df93816
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy

on:
workflow_run:
workflows: ['Docker']
types:
- completed

jobs:
deploy:
name: deploy image
runs-on: ubuntu-latest

steps:
- name: Install SSH
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: Deploy
run: |
ssh ${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && echo ${{ secrets.PACKAGE_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin && bash ./update.sh && exit"
- name: cleanup
run: rm -rf ~/.ssh

0 comments on commit df93816

Please sign in to comment.