Skip to content

Commit 70c960c

Browse files
authored
Added deploy to github pages
1 parent 7ad4cbf commit 70c960c

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build and deploy
22

33
on:
44
push:
@@ -11,16 +11,13 @@ permissions:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
16-
1715
steps:
1816
- uses: actions/checkout@v4
1917
- uses: actions/setup-haskell@v1
2018
with:
2119
ghc-version: '9.10.1'
2220
cabal-version: '3.12.1.0'
23-
2421
- name: Cache
2522
uses: actions/cache@v3
2623
env:
@@ -32,7 +29,6 @@ jobs:
3229
${{ runner.os }}-build-${{ env.cache-name }}-
3330
${{ runner.os }}-build-
3431
${{ runner.os }}-
35-
3632
- name: Install dependencies
3733
run: |
3834
cabal update
@@ -41,7 +37,16 @@ jobs:
4137
run: cabal build
4238
- name: Build static website
4339
run: cabal exec site build
44-
- uses: actions/upload-artifact@v4
45-
with:
46-
name: build
47-
path: _site
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)