Skip to content

Commit

Permalink
Add Deployment to Github Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
RoboticMind committed Dec 17, 2023
1 parent fc66203 commit b44acbf
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#based on https://github.com/isaacvando/elm-to-gh-pages
name: Deploy to Github Pages

on:
push:
branches: ["main"]
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 --optimize

- 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

0 comments on commit b44acbf

Please sign in to comment.