-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 3ac714f 🚀
- Loading branch information
0 parents
commit 51e4c2e
Showing
12 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
# Author: emilk, https://github.com/emilk/eframe_template/blob/master/.github/workflows/pages.yml | ||
|
||
name: Github Pages | ||
|
||
# By default, runs if you push to master. keeps your deployed app in sync with master branch. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
# to only run when you do a new github release, comment out above part and uncomment the below trigger. | ||
# on: | ||
# release: | ||
# types: | ||
# - published | ||
|
||
permissions: | ||
contents: write # for committing to gh-pages branch. | ||
|
||
jobs: | ||
build-github-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 # repo checkout | ||
- uses: actions-rs/toolchain@v1 # get rust toolchain for wasm | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
override: true | ||
- name: Rust Cache # cache the rust build artefacts | ||
uses: Swatinem/rust-cache@v1 | ||
- name: Download and install Trunk binary | ||
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- | ||
- name: Build # build | ||
# "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository | ||
# using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico . | ||
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested | ||
# relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which | ||
# will obviously return error 404 not found. | ||
run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: dist | ||
# this option will not maintain any history of your previous pages deployment | ||
# set to false if you want all page build to be committed to your gh-pages branch history | ||
single-commit: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Rust Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release: | ||
name: release ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [ {name: x86_64-pc-windows-gnu} ] | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Compile and release | ||
uses: rust-build/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
TOOLCHAIN_VERSION: nightly | ||
RUSTTARGET: ${{ matrix.target.name }} | ||
STATIC_LINKING: true | ||
EXTRA_FILES: "README.md LICENSE config.toml" |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!doctype html><meta content="text/html; charset=utf-8" http-equiv=Content-Type><meta content="width=device-width,initial-scale=1.0,user-scalable=no" name=viewport><title>Minesweeper6D</title><script type=module>import a,*as b from"minesweeper6d/minesweeper6d-7ec3df6232c507b5.js";a(`minesweeper6d/minesweeper6d-7ec3df6232c507b5_bg.wasm`);window.wasmBindings=b</script><base href=minesweeper6d/><link href=minesweeper6d/favicon-f402c8741ce815ec.ico integrity=sha384-jNOAE6jgE03LznIulCTVP6BH4NrTuROFjP9wj8bV1UUMJKtZAvstFpIAP3PDcFpx rel=icon><link href=manifest.json rel=manifest><link href=icon_ios_touch_192.png rel=apple-touch-icon><meta media="(prefers-color-scheme: light)" content=white name=theme-color><meta media="(prefers-color-scheme: dark)" content=#404040 name=theme-color><style>html{touch-action:manipulation}body{background:#909090}@media (prefers-color-scheme:dark){body{background:#404040}}html,body{width:100%;height:100%;overflow:hidden;margin:0!important;padding:0!important}canvas{margin-left:auto;margin-right:auto;display:block;position:absolute;top:0%;left:50%;transform:translate(-50%)}.centered{color:#f0f0f0;text-align:center;margin-left:auto;margin-right:auto;font-family:Ubuntu-Light,Helvetica,sans-serif;font-size:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.lds-dual-ring{width:24px;height:24px;display:inline-block}.lds-dual-ring:after{content:" ";border:3px solid #fff;border-color:#fff #0000;border-radius:50%;width:24px;height:24px;margin:0;animation:1.2s linear infinite lds-dual-ring;display:block}@keyframes lds-dual-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}</style><link as=fetch crossorigin href=minesweeper6d/minesweeper6d-7ec3df6232c507b5_bg.wasm integrity=sha384-39EMWVmKIYuY8FHZYeJbFdXSCmxQuetM8dgNLPLHTVwXFwLDhOnkPLssjwmbJL7n rel=preload type=application/wasm><link crossorigin href=minesweeper6d/minesweeper6d-7ec3df6232c507b5.js integrity=sha384-AnRpluy5MXtVuVZxLdGattjRkaWDw-Qkoiby50oTRs3ei-y_ulHCI7yjxFLWjpdD rel=modulepreload></head><body><canvas id=the_canvas_id></canvas><script>if(`serviceWorker` in navigator&&window.location.hash!==`#dev`){window.addEventListener(`load`,(()=>{navigator.serviceWorker.register(`sw.js`)}))}</script></body></html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "egui Template PWA", | ||
"short_name": "egui-template-pwa", | ||
"icons": [ | ||
{ | ||
"src": "./icon-256.png", | ||
"sizes": "256x256", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "./maskable_icon_x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "./icon-1024.png", | ||
"sizes": "1024x1024", | ||
"type": "image/png" | ||
} | ||
], | ||
"lang": "en-US", | ||
"id": "/index.html", | ||
"start_url": "./index.html", | ||
"display": "standalone", | ||
"background_color": "white", | ||
"theme_color": "white" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var cacheName = 'minesweeper6d-pwa'; | ||
var filesToCache = [ | ||
'./', | ||
'./index.html', | ||
'./eframe_template.js', | ||
'./eframe_template_bg.wasm', | ||
]; | ||
|
||
/* Start the service worker and cache all of the app's content */ | ||
self.addEventListener('install', function (e) { | ||
e.waitUntil( | ||
caches.open(cacheName).then(function (cache) { | ||
return cache.addAll(filesToCache); | ||
}) | ||
); | ||
}); | ||
|
||
/* Serve cached content when offline */ | ||
self.addEventListener('fetch', function (e) { | ||
e.respondWith( | ||
caches.match(e.request).then(function (response) { | ||
return response || fetch(e.request); | ||
}) | ||
); | ||
}); |