Skip to content

Commit

Permalink
deploy to gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
nwolff committed Dec 24, 2023
1 parent 851740f commit a675ca8
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 6 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/elm-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Made by Isaac Van Doren. Source at https://github.com/isaacvando/elm-to-gh-pages.
name: Deploy an Elm app to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# Cancel current deployment when a new push occurs
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build Elm artifact
uses: jorelali/setup-elm@v5
with:
elm-version: 0.19.1
- run: elm make src/Main.elm --output=target/elm.js

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "."

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Intellij
# IDEs
*.iml
.idea/
.vscode/

# Elm
elm-stuff/
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
Automatically deployed to:

https://nwolff.github.io/secretsanta-elm/

(We use https://github.com/isaacvando/elm-to-gh-pages)

---

Requires elm0.19.1

To develop:

elm reactor


Or if you've installed elm-live:

elm-live src/Main.elm --open -- --output target/elm.js --debug

elm-live.js src/Main.elm --open -- --output target/elm.js --debug

To build:

elm make src/Main.elm --output target/elm.js

6 changes: 6 additions & 0 deletions assets/bootstrap.min.css

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
<head>
<title>Secret Santa</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="icon" type="image/png" href="assets/favicon.ico">

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="assets/bootstrap.min.css" rel="stylesheet" media="screen">

<link href="assets/style.css" rel="stylesheet">

Expand Down

0 comments on commit a675ca8

Please sign in to comment.