Skip to content

Commit

Permalink
make the repo an example
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacvando committed Sep 23, 2023
1 parent 4d3cb6e commit a76ce2e
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
elm-stuff
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`!

Expand Down
24 changes: 24 additions & 0 deletions elm.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
12 changes: 12 additions & 0 deletions src/Main.elm
Original file line number Diff line number Diff line change
@@ -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!" ]
}

0 comments on commit a76ce2e

Please sign in to comment.