Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #261 from GiganticMinecraft/fix/cd
Browse files Browse the repository at this point in the history
ci: remove cd
  • Loading branch information
Lucky authored Jul 7, 2024
2 parents 1e5319b + 37e4b76 commit 7172a66
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/ci-and-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,46 +73,3 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

deploy:
name: Deploy image on main branch
runs-on: ubuntu-latest
needs:
- lint-and-test
- build-image
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- name: Make GitHub App Secret Key
working-directory: ./attachments
# 秘密鍵は改行が含まれているのでヒアドキュメントを利用して書き込む
run: |
cat > key.pem <<EOD
${{ secrets.GH_APP_RSA_KEY }}
EOD
- name: Make .env
working-directory: ./attachments
run: |
cat > .env <<EOD
DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }}
DISCORD_APPLICATION_ID=${{ secrets.DISCORD_APPLICATION_ID }}
DISCORD_GUILD_ID=${{ secrets.DISCORD_GUILD_ID }}
REDMINE_API_KEY=${{ secrets.REDMINE_KEY }}
GH_APP_ID=${{ secrets.GH_APP_ID }}
EOD
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
config: |
Host vps
HostName ${{ secrets.SSH_ADDRESS }}
User ${{ secrets.SSH_USER }}
IdentityFile ~/.ssh/id_rsa
Port ${{ secrets.SSH_PORT }}
- name: Rsync files
working-directory: ./attachments
run: rsync -auvz --delete ./ vps:~/idea/
- name: Launch
run: ssh vps "cd ~/idea/;chmod u+x release.sh;echo ${{ secrets.SSH_USER_PASS }} | sudo -S ./release.sh"

0 comments on commit 7172a66

Please sign in to comment.