Skip to content

Merge pull request #41 from mirumirumi/main #29

Merge pull request #41 from mirumirumi/main

Merge pull request #41 from mirumirumi/main #29

Workflow file for this run

name: deploy
on:
push:
branches:
- release/prd
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: "14"
- run: npm install
- name: gpg
run: |
echo "${{ secrets.GPG_PASSPHRASE }}" | sudo gpg --batch --passphrase-fd 0 --output ".env.prd" --decrypt ".env.prd.gpg"
- run: npm run build-prd
- name: prd deploy
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/how-far-map/*
ls -lha dist/
scp -r -i ~/.ssh/id_rsa -P ${{ secrets.CONOHA_PORT }} dist/* ${{ secrets.CONOHA_USERNAME }}@${{ secrets.CONOHA_HOST }}:public_html/mirumi.me/apps/how-far-map/