Skip to content

Commit

Permalink
Merge pull request #40 from mirumirumi/main
Browse files Browse the repository at this point in the history
ci: add deploy.yml
  • Loading branch information
mirumirumi authored Jul 1, 2024
2 parents 22daa6f + 110a37f commit 6ecee73
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,35 @@ name: deploy
on:
push:
branches:
- never/trigggggggggerd
- release/prd
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/[email protected]
- run: npm install
- run: npm run build-prd
with:
node-version: "14"

- name: Installing npm modules...
run: npm install

# - name: Decrypting secrets with gpg...
# run: |
# echo "${{ secrets.GPG_PASSPHRASE }}" | sudo gpg --batch --passphrase-fd 0 --output ".env.prd" --decrypt ".env.prd.gpg"

- name: Building...
run: npm run build-prd

- name: Deploying...
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.CONOHA_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa ${{ secrets.CONOHA_USERNAME }}@${{ secrets.CONOHA_HOST }} -p ${{ secrets.CONOHA_PORT }} rm -rf public_html/mirumi.in/apps/yourcat/*
ls -lha dist/
scp -r -i ~/.ssh/id_rsa -P ${{ secrets.CONOHA_PORT }} dist/* ${{ secrets.CONOHA_USERNAME }}@${{ secrets.CONOHA_HOST }}:public_html/mirumi.in/apps/yourcat/

0 comments on commit 6ecee73

Please sign in to comment.