Skip to content

Commit

Permalink
Merge pull request #92 from serras/main
Browse files Browse the repository at this point in the history
Automatically deploy to GitHub pages
  • Loading branch information
david-christiansen authored Jun 12, 2022
2 parents 37795ef + 36d8c95 commit 37e966a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
push:
branches:
- main

permissions:
contents: write

jobs:

build-and-test:
name: Build site
runs-on: ubuntu-latest

steps:
- name: Set up Haskell
uses: haskell/actions/setup@v2

- name: Check out repo
uses: actions/checkout@v3

- name: Read the Cabal cache
uses: actions/cache@v3
with:
path: |
~/.cabal/store
message-index/dist-newstyle
key: cabal-cache-${{ github.sha }}
restore-keys: |
cabal-cache
- name: Update the Cabal index
run: cabal update

- name: Build with Hakyll
working-directory: message-index
run: cabal run site build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./message-index/_site
1 change: 1 addition & 0 deletions message-index/templates/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<title>$title$ — Haskell Error Index</title>
<link rel="stylesheet" href="/css/default.css" />
</head>
Expand Down

0 comments on commit 37e966a

Please sign in to comment.