Skip to content

Commit a4d79a1

Browse files
committed
ci: add deployment of playground
1 parent 37968e8 commit a4d79a1

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- "**/graphite-base/**"
1010
release:
1111
types: [published] # Trigger publish job when a GitHub release is published
12+
workflow_dispatch: # Allow manual runs
1213

1314
permissions:
1415
contents: read
@@ -112,3 +113,36 @@ jobs:
112113
REMOTE_PORT: ${{ secrets.SSH_PORT }}
113114
SOURCE: "combined/."
114115
TARGET: ${{ secrets.TARGET_DIR_DOCS }}
116+
117+
deploy-playground:
118+
needs: build-and-test
119+
runs-on: ubuntu-latest
120+
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
121+
steps:
122+
- uses: actions/checkout@v4
123+
with:
124+
ref: ${{ github.ref }}
125+
- uses: pnpm/action-setup@v4
126+
- uses: actions/setup-node@v4
127+
with:
128+
node-version: 22
129+
cache: "pnpm"
130+
- name: Install and build parent package
131+
run: |
132+
pnpm install
133+
pnpm build
134+
- name: Install playground dependencies
135+
working-directory: playground
136+
run: pnpm install
137+
- name: Build playground in static mode
138+
working-directory: playground
139+
run: pnpm generate
140+
- name: Deploy playground to production server
141+
uses: easingthemes/ssh-deploy@main
142+
env:
143+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
144+
REMOTE_HOST: ${{ secrets.SSH_HOST }}
145+
REMOTE_USER: ${{ secrets.SSH_USER }}
146+
REMOTE_PORT: ${{ secrets.SSH_PORT }}
147+
SOURCE: "playground/.output/public/."
148+
TARGET: ${{ secrets.TARGET_DIR_PLAYGROUND }}

0 commit comments

Comments
 (0)