Skip to content

d2-AI prompt:

d2-AI prompt: #99

Workflow file for this run

name: Deploy Preview
on:
push:
jobs:
deploy_site:
runs-on: arc-runner-set-webzard
name: Deploy the site
steps:
- name: Executing remote SSH commands
uses: appleboy/ssh-action@master
with:
host: 10.255.4.115
username: root
key: ${{ secrets.KEY }}
script: |
whoami
ls -al
nvm use 16
cd /home/smartx/dovetail-v2
git fetch
git checkout origin/${{ github.ref_name }}
yarn
pm2 delete preview
cd packages/refine
yarn vite build
pm2 start npm --name "preview" -- run preview
- name: Comment the PR
uses: actions/github-script@v6
with:
script: |
const issues = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
head: `${context.repo.owner}:${context.ref.replace('refs/heads/', '')}`
})
const pr = context.issue.number || issues.data[0].number
if (pr) {
github.rest.issues.createComment({
issue_number: pr,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Your code has been deployed to http://10.255.4.115:4173/ .'
})
}