Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f98ab44f5 | ||
|
|
58f69047b6 | ||
|
|
c77e021886 | ||
|
|
37729f1bb3 |
45
README.md
45
README.md
@@ -86,6 +86,7 @@ Do you want to skip the docker build step? OK, the script mode is available.
|
|||||||
- [⭐️ Static Site Generators with Python](#%EF%B8%8F-static-site-generators-with-python)
|
- [⭐️ Static Site Generators with Python](#%EF%B8%8F-static-site-generators-with-python)
|
||||||
- [⭐️ mdBook (Rust)](#%EF%B8%8F-mdbook-rust)
|
- [⭐️ mdBook (Rust)](#%EF%B8%8F-mdbook-rust)
|
||||||
- [⭐️ Flutter Web](#%EF%B8%8F-flutter-web)
|
- [⭐️ Flutter Web](#%EF%B8%8F-flutter-web)
|
||||||
|
- [⭐️ Elm](#%EF%B8%8F-elm)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
- [About the author](#about-the-author)
|
- [About the author](#about-the-author)
|
||||||
|
|
||||||
@@ -343,7 +344,7 @@ When we create a commit with a message `docs: Update some post`, a deployment co
|
|||||||
PUBLISH_BRANCH: gh-pages
|
PUBLISH_BRANCH: gh-pages
|
||||||
PUBLISH_DIR: ./public
|
PUBLISH_DIR: ./public
|
||||||
with:
|
with:
|
||||||
commitMessage: ${{ github.event.commits[0].message }}
|
commitMessage: ${{ github.event.head_commit.message }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### ⭐️ Script mode
|
### ⭐️ Script mode
|
||||||
@@ -785,6 +786,48 @@ jobs:
|
|||||||
PUBLISH_DIR: ./build/web
|
PUBLISH_DIR: ./build/web
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### ⭐️ Elm
|
||||||
|
|
||||||
|
An exapmle workflow for [Elm] with [justgook/setup-elm].
|
||||||
|
|
||||||
|
[Elm]: https://elm-lang.org
|
||||||
|
[justgook/setup-elm]: https://github.com/justgook/setup-elm
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: github pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Elm
|
||||||
|
uses: justgook/setup-elm@v1
|
||||||
|
|
||||||
|
- name: Make
|
||||||
|
run: elm make --optimize src/Main.elm
|
||||||
|
|
||||||
|
- name: Move files
|
||||||
|
run: |
|
||||||
|
mkdir ./public
|
||||||
|
mv ./index.html ./public/
|
||||||
|
# If you have non-minimal setup with some assets and separate html/js files,
|
||||||
|
# provide --output=<output-file> option for `elm make` and remove this step
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v2
|
||||||
|
env:
|
||||||
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
|
PUBLISH_BRANCH: gh-pages
|
||||||
|
PUBLISH_DIR: ./public
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
- [MIT License - peaceiris/actions-gh-pages]
|
- [MIT License - peaceiris/actions-gh-pages]
|
||||||
|
|||||||
@@ -29,3 +29,9 @@ inputs:
|
|||||||
commitMessage:
|
commitMessage:
|
||||||
description: 'Set custom commit message'
|
description: 'Set custom commit message'
|
||||||
required: false
|
required: false
|
||||||
|
tagName:
|
||||||
|
description: 'Set tag name'
|
||||||
|
required: false
|
||||||
|
tagMessage:
|
||||||
|
description: 'Set tag message'
|
||||||
|
required: false
|
||||||
|
|||||||
@@ -142,4 +142,15 @@ else
|
|||||||
git push origin "${remote_branch}"
|
git push origin "${remote_branch}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${INPUT_TAGNAME}" ]]; then
|
||||||
|
print_info "Tag name: ${INPUT_TAGNAME}"
|
||||||
|
if [[ -n "${INPUT_TAGMESSAGE}" ]]; then
|
||||||
|
print_info "Tag message: ${INPUT_TAGMESSAGE}"
|
||||||
|
git tag "${INPUT_TAGNAME}" -m "${INPUT_TAGMESSAGE}"
|
||||||
|
else
|
||||||
|
git tag "${INPUT_TAGNAME}"
|
||||||
|
fi
|
||||||
|
git push origin "${INPUT_TAGNAME}"
|
||||||
|
fi
|
||||||
|
|
||||||
print_info "${GITHUB_SHA} was successfully deployed"
|
print_info "${GITHUB_SHA} was successfully deployed"
|
||||||
|
|||||||
Reference in New Issue
Block a user