Skip to content

CD

CD #114

Workflow file for this run

name: CD
on:
workflow_run:
workflows:
- CI
types:
- completed
jobs:
cd:
runs-on: sg
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Download Artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: CI
workflow_conclusion: success
run_id: ${{ github.event.workflow_run.id }}
run_number: ${{ github.event.workflow_run.run_number }}
name: wallet-bridge-artifact-${{ github.event.workflow_run.head_commit.id }}.zip
- name: List file
run: ls
- name: Unzip artifact
run: rm -rf ./dist && unzip wallet-bridge-artifact-${{ github.event.workflow_run.head_commit.id }}.zip -d ./dist
- name: Deploy storybook.d.id
run: |
rsync -a ./dist/ root@frontendtest:/root/release_test/code/storybook.d.id
ssh root@frontendtest 'source ~/.zshrc && cd /root/release_test/code/storybook.d.id && npm install && pm2 delete storybook.d.id && pm2 start npm --name "storybook.d.id" -- run dev'