notes about how to run locally #170
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |