Skip to content

Commit 34aa8a4

Browse files
committed
depending more on node to build
1 parent e8ebccb commit 34aa8a4

File tree

6 files changed

+1482
-97
lines changed

6 files changed

+1482
-97
lines changed

.github/workflows/checks.yml

-17
This file was deleted.

.github/workflows/web-publish.yml

+19-23
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,36 @@ on:
55
branches:
66
- "main"
77

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
817
jobs:
918
build:
1019
runs-on: ubuntu-24.04
1120
steps:
12-
- name: Create branch directories
13-
run: mkdir -p main public
1421
- uses: actions/checkout@v4
15-
with:
16-
path: main
17-
- uses: actions/checkout@v4
18-
with:
19-
ref: public
20-
path: public
2122
- name: Install NodeJS
2223
uses: actions/setup-node@v4
2324
with:
2425
node-version: "22"
2526
- name: Install webpack
2627
run: npm install
27-
working-directory: ./main
2828
- name: Package libraries
29-
run: webpack
30-
working-directory: ./main
31-
- name: Copy files to right location
29+
run: npm run build
30+
- name: Add release number
3231
run: |
33-
cp main/src/html/index.html public
34-
cp main/src/css/main.css public
35-
cp main/src/data/backgrounds.json public
36-
cp main/src/data/streams.json public
37-
cp main/dist/main.js main/dist/main.js.map public
38-
cp main/src/img/favicon.gif public
39-
echo $GITHUB_SHA > public/release
40-
- name: Commit back updated files to public branch
41-
uses: stefanzweifel/git-auto-commit-action@v5
32+
echo $GITHUB_SHA > ./dist/release
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v5
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
4237
with:
43-
repository: public
44-
commit_message: Updating static webpage
38+
path: "./dist"
39+
- name: Deploy to GitHub Pages
40+
uses: actions/deploy-pages@v4

README.md

+5-15
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
You can submit radio stations from YouTube as Pull Requests, or fork this repo to create your own playlist.
66

77
## How does it work
8+
89
There is a hidden iframe that switches between different URLs for embedded live streams from YouTube based on the station you select. The code here hooks in to an unofficial API in YouTube that allows you to pause a stream.
910

1011
### Enable Auto Play
1112

12-
Some browsers block automatic playing of videos. You may have to go to YouTube to enable this to get Static to work.
13+
Some browsers block automatic playing of videos. You may have to go to YouTube to enable autoplay to get Static to work.
1314

1415
The backgrounds are videos from giphy that are loaded in a video element in the background.
1516

@@ -28,21 +29,10 @@ You can run this locally by building with webpack, putting all the files togethe
2829
From the root of this repo:
2930

3031
```bash
31-
npx webpack-cli
32-
mkdir -p public
33-
cp main/dist/main.js main/dist/main.js.map public
34-
cp main/src/html/index.html public
35-
cp main/src/css/main.css public
36-
cp main/src/data/* public
37-
```
38-
39-
### Testing JS changes
40-
41-
```bash
42-
npx webpack-cli && cp dist/main.js* public/ && python3 -m http.server -d public/
32+
npm install
33+
npm run build
34+
npm run local
4335
```
4436

45-
Then opening your browser at the URL it displays
46-
4737
## License
4838
AGPLv3

0 commit comments

Comments
 (0)