generated from virtual-labs/ph3-exp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.14 KB
/
deployment-script.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
# This workflow is used to build the experiment and push it to github pages
name: Deploy Testing Branch
on:
push:
# mentioning which branch should be used to build the experimnet
branches:
- testing
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
check-latest: true
- run: |
git clone --depth=1 https://github.com/virtual-labs/ph3-lab-mgmt
cd ph3-lab-mgmt
npm install
npm run build-exp
cd ../
git config --local user.email "[email protected]"
git config --local user.name "vleadadmin"
git checkout --orphan gh-pages
git reset
git add build/* -f
git mv build/* ./ -f
git commit -m "https://virtual-labs.github.io/${{ github.repository }} click on the link to test your code."
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ORG_OWNER_GITHUB_TOKEN }}
force: true
branch: gh-pages
# Reference : https://github.com/marketplace/actions/github-push