Skip to content

Commit 6675829

Browse files
authored
Fce 3152/deploy examples (#64)
* Add fishjam-chat deployment workflow Moved from web-client-sdk repo after examples migration (abad93c). Deploys web-react/fishjam-chat to nginx server via SCP on push to main. * Add livestreaming deployment workflow Moved from web-client-sdk repo after examples migration (abad93c). Deploys web-react/livestreaming to GitHub Pages on push to main. * Set Vite base path for GitHub Pages deployment GitHub Pages serves from a sub-path (/examples/), so assets need relative URLs to load correctly.
1 parent 9772b09 commit 6675829

2 files changed

Lines changed: 110 additions & 0 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy Fishjam Chat as static page
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths:
7+
- "web-react/fishjam-chat/**"
8+
- ".github/workflows/fishjam-chat-deploy.yml"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: "fishjam-chat"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build-deploy:
20+
if: github.actor != 'dependabot[bot]'
21+
environment:
22+
name: fishjam-chat
23+
url: ${{ vars.FISHJAM_CHAT_URL }}
24+
runs-on: ubuntu-latest
25+
defaults:
26+
run:
27+
working-directory: web-react/fishjam-chat
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v5
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v5
34+
with:
35+
node-version: "22"
36+
cache: "yarn"
37+
cache-dependency-path: ./web-react/fishjam-chat/yarn.lock
38+
39+
- name: Install dependencies
40+
run: yarn install --frozen-lockfile
41+
42+
- name: Build project
43+
run: yarn build
44+
45+
- name: Copy files to deployment server
46+
uses: appleboy/scp-action@v0.1.7
47+
with:
48+
host: ${{ vars.FISHJAM_CHAT_HOST }}
49+
username: ${{ secrets.FISHJAM_CHAT_USERNAME }}
50+
key: ${{ secrets.FISHJAM_CHAT_PRIVATE_KEY }}
51+
rm: true
52+
strip_components: 3
53+
source: web-react/fishjam-chat/dist/*
54+
target: /usr/share/nginx/html
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Livestreaming example
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths:
7+
- "web-react/livestreaming/**"
8+
- ".github/workflows/livestreaming-deploy.yml"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
deploy:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
working-directory: web-react/livestreaming
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v5
32+
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v5
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v5
38+
with:
39+
node-version: "22"
40+
cache: "yarn"
41+
cache-dependency-path: ./web-react/livestreaming/yarn.lock
42+
43+
- name: Install dependencies
44+
run: yarn install --frozen-lockfile
45+
46+
- name: Build project
47+
run: yarn build --base "./"
48+
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: "web-react/livestreaming/dist"
53+
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)