-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (43 loc) · 1.21 KB
/
web-publish.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
---
name: Build static website
on:
push:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Create branch directories
run: mkdir -p main public
- uses: actions/checkout@v2
with:
path: main
- uses: actions/checkout@v2
with:
ref: public
path: public
- name: Install NodeJS
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install webpack
run: npm install
working-directory: ./main
- name: Package libraries
run: webpack
working-directory: ./main
- name: Copy files to right location
run: |
cp main/src/html/index.html public
cp main/src/css/main.css public
cp main/src/data/backgrounds.json public
cp main/src/data/streams.json public
cp main/dist/main.js main/dist/main.js.map public
cp main/src/img/favicon.gif public
echo $GITHUB_SHA > public/release
- name: Commit back updated files to public branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
repository: public
commit_message: Updating static webpage