Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ on:
types: [published]

jobs:
deploy-client:
name: Build and Export Client
if: github.event.release.target_commitish == 'master'
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}
- name: List files for publish
run: cd public && ls -l -a
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
publish_branch: gh-pages

docker-build-push-tag:
name: Push Tagged Image
if: github.event.release.target_commitish == 'master' && vars.DOCKERHUB_USERNAME != ''
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Simple localhost static website development environment for plain HTML, CSS, and
Its development static hosting and file-serving architecture are closer to traditional static web servers. Uses **Gulp** and **Browser-Sync**

> [!NOTE]
> An alternate localhost static development environment, also with live reload using Webpack is available at<br>
> An alternate localhost static development environment using **Webpack**, also with live reload, is available at<br>
> https://github.com/weaponsforge/livereload-webpack

### Content
Expand Down Expand Up @@ -92,14 +92,15 @@ https://hub.docker.com/r/weaponsforge/livereload-basic

2. Run the development image.
- Using only Docker (1st option):
> **INFO:** This option requires having the static website development HTML, CSS and JavaScript files inside a "/public" directory, consisting of at least:
> **INFO:** This option requires having the static website development HTML, CSS and JavaScript files inside a `"/public"` directory, consisting of at least:

```
├─ my-website-project
│ ├─ public
│ ├─── index.html
│ ├─── ...
```
Navigate to the website project directory (for example, `"my-website-project"`) using a terminal, then run:

```
# On Linux OS
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const watch = function () {
const css = `${root}/**/*.css`
const js = `${root}/**/*.js`

// Use gulp internal and polling if working in Windows WSL2 to enable hot reload
// Use gulp interval and polling if working in Windows WSL2 to enable hot reload
gulp.watch(html,
(process.env.USE_POLLING && { interval: 1000, usePolling: true })
).on('change', browserSync.reload)
Expand Down
38 changes: 19 additions & 19 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Live Reload Demo</title>
<link href="main.css" rel="stylesheet" type="text/css">
<script src="main.js" type="text/javascript"></script>
</head>
<body onload="init()">
<main>
<h1>It Works!</h1>
<button onclick="clickme()">Click Me</button>
<div class="imgcontainer">
<img src="images/cute-doggo.png">
</div>
</main>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Live Reload Demo</title>
<link href="main.css" rel="stylesheet" type="text/css">
<script src="main.js" type="text/javascript"></script>
</head>
<body onload="init()">
<main>
<h1>It Works!</h1>
<button onclick="clickme()">Click Me</button>
<div class="imgcontainer">
<img src="images/cute-doggo.png">
</div>
</main>
</body>
</html>
46 changes: 23 additions & 23 deletions public/main.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
body, html {
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
background-image: url('images/landscape.jpg');
}
.imgcontainer {
margin-top: 48px;
}
img {
width: 300px;
height: 300px;
}
main {
width: 400px;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
}
body, html {
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
background-image: url('images/landscape.jpg');
}

.imgcontainer {
margin-top: 48px;
}

img {
width: 300px;
height: 300px;
}

main {
width: 400px;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
}
14 changes: 7 additions & 7 deletions public/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function init () {
console.log('loaded!!')
}
function clickme () {
alert('i was clicked!')
}
function init () {
console.log('loaded!!')
}

function clickme () {
alert('i was clicked!')
}