diff --git a/elm-to-gh-pages.yml b/.github/workflows/elm-to-gh-pages.yml similarity index 100% rename from elm-to-gh-pages.yml rename to .github/workflows/elm-to-gh-pages.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e185314 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +elm-stuff \ No newline at end of file diff --git a/README.md b/README.md index caa7e54..1faca19 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # elm-to-pages 🌳 -`elm-to-gh-pages` is a GitHub Actions workflow that deploys an Elm app to GitHub Pages. +`elm-to-gh-pages` is an example of how to deploy an Elm app to GitHub pages using GitHub Actions. You can either copy this repo and start from their, or follow the explanation below to setup an existing project ⬇️. ## Usage In a _public_ GitHub repo, go to `Settings > Pages > Source` and choose `GitHub Actions` instead of `Deploy from a branch`. -Now create a directory `.github/workflows/` and put [`elm-to-gh-pages.yml`](./elm-to-gh-pages.yml) in it. +Now create a directory `.github/workflows/` and put [`elm-to-gh-pages.yml`](./.github/workflows/elm-to-gh-pages.yml) in it. On your next push, your Elm app will be deployed to `yourusername.github.io/yourreponame`! diff --git a/elm.json b/elm.json new file mode 100644 index 0000000..ce2a08d --- /dev/null +++ b/elm.json @@ -0,0 +1,24 @@ +{ + "type": "application", + "source-directories": [ + "src" + ], + "elm-version": "0.19.1", + "dependencies": { + "direct": { + "elm/browser": "1.0.2", + "elm/core": "1.0.5", + "elm/html": "1.0.0" + }, + "indirect": { + "elm/json": "1.1.3", + "elm/time": "1.0.0", + "elm/url": "1.0.0", + "elm/virtual-dom": "1.0.3" + } + }, + "test-dependencies": { + "direct": {}, + "indirect": {} + } +} diff --git a/src/Main.elm b/src/Main.elm new file mode 100644 index 0000000..a3a43a0 --- /dev/null +++ b/src/Main.elm @@ -0,0 +1,12 @@ +module Main exposing (main) + +import Browser +import Html + + +main = + Browser.sandbox + { init = {} + , update = \_ _ -> {} + , view = \_ -> Html.h1 [] [ Html.text "Live on Github Pages!" ] + }