-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (47 loc) · 1.61 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy Jitsi-Box UI
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./box-ui
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
cache-dependency-path: ./box-ui/package-lock.json
- name: Install dependencies
run: npm ci
- name: Create the production build
run: npm run build --if-present
env:
REACT_APP_MARSHA_URL: https://marsha.education/api/video/pairing-challenge
- name: Create the deployment directory, copy the git repo there & checkout the deployment branch
# We use ../.git instead of .git because we are using ./box-ui as working directory for run commands
run: |
mkdir ~/deployment
cp -R ../.git ~/deployment
cd ~/deployment
git fetch
git checkout pages-deployment
- name: Clean the deployment directory & copy the build results
run: |
rm -rf ~/deployment/*
cp -R build/* ~/deployment
echo www.jitsi-box.com > ~/deployment/CNAME
- name: Deploy the build artifact to Github Pages by pushing on the deployment branch
run: |
cd ~/deployment
git config user.email "funmoocbot@users.noreply.github.com"
git config user.name "FUN MOOC bot"
git add --all
git commit --allow-empty -m "Deploy to Github Pages"
git push origin pages-deployment