Skip to content

Commit c77e021

Browse files
VladimirLogachevpeaceiris
authored andcommitted
docs: Add elm example workflow (#65)
* Add elm section to README.md
1 parent 37729f1 commit c77e021

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Do you want to skip the docker build step? OK, the script mode is available.
8686
- [⭐️ Static Site Generators with Python](#%EF%B8%8F-static-site-generators-with-python)
8787
- [⭐️ mdBook (Rust)](#%EF%B8%8F-mdbook-rust)
8888
- [⭐️ Flutter Web](#%EF%B8%8F-flutter-web)
89+
- [⭐️ Elm](#%EF%B8%8F-elm)
8990
- [License](#license)
9091
- [About the author](#about-the-author)
9192

@@ -785,6 +786,48 @@ jobs:
785786
PUBLISH_DIR: ./build/web
786787
```
787788

789+
### ⭐️ Elm
790+
791+
An exapmle workflow for [Elm] with [justgook/setup-elm].
792+
793+
[Elm]: https://elm-lang.org
794+
[justgook/setup-elm]: https://github.com/justgook/setup-elm
795+
796+
```yaml
797+
name: github pages
798+
799+
on:
800+
push:
801+
branches:
802+
- master
803+
804+
jobs:
805+
build-deploy:
806+
runs-on: ubuntu-latest
807+
steps:
808+
- uses: actions/checkout@v2
809+
810+
- name: Setup Elm
811+
uses: justgook/setup-elm@v1
812+
813+
- name: Make
814+
run: elm make --optimize src/Main.elm
815+
816+
- name: Move files
817+
run: |
818+
mkdir ./public
819+
mv ./index.html ./public/
820+
# If you have non-minimal setup with some assets and separate html/js files,
821+
# provide --output=<output-file> option for `elm make` and remove this step
822+
823+
- name: Deploy
824+
uses: peaceiris/actions-gh-pages@v2
825+
env:
826+
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
827+
PUBLISH_BRANCH: gh-pages
828+
PUBLISH_DIR: ./public
829+
```
830+
788831
## License
789832
790833
- [MIT License - peaceiris/actions-gh-pages]

0 commit comments

Comments
 (0)