Skip to content

Commit 5b0ed5d

Browse files
committed
Runner for branch
1 parent 0a3d5bb commit 5b0ed5d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build web pages for branch
2+
3+
on:
4+
push:
5+
branches:
6+
- web
7+
workflow_dispatch:
8+
9+
jobs:
10+
run-on-server:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Extract branch name
15+
shell: bash
16+
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
17+
id: extract_branch
18+
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup SSH
23+
uses: webfactory/ssh-agent@v0.8.0
24+
with:
25+
ssh-private-key: ${{ secrets.CI_SSH_KEY }}
26+
27+
- name: Run node runner.mjs on remote server
28+
run: |
29+
ssh -o StrictHostKeyChecking=no ci@${{ secrets.REMOTE_HOST }} "cd /var/www/core-js/ && node runner.mjs branch=${{ steps.extract_branch.outputs.branch }}"

0 commit comments

Comments
 (0)