This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'deploy-20220513-1346-UTC' into gh-pages
- Loading branch information
Showing
15 changed files
with
1,525 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.elm] | ||
indent_style = space | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "08:00" | ||
timezone: "Asia/Tokyo" | ||
- package-ecosystem: "elm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "08:00" | ||
timezone: "Asia/Tokyo" | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "08:00" | ||
timezone: "Asia/Tokyo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Cleanup stagings | ||
on: | ||
pull_request: | ||
types: [closed] | ||
paths-ignore: | ||
- 'tests/**' | ||
- '.github/workflows/test.yml' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: git setting | ||
run: | | ||
git config --local user.email "kachick1+mobu-elm@gmail.com" | ||
git config --local user.name "mobu-elm bot" | ||
- name: Deploy to GitHub Pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUMBER: ${{ github.event.number }} | ||
run: | | ||
git fetch | ||
git checkout gh-pages | ||
rm -rf "docs/pr-${PR_NUMBER}" | ||
git commit -a -m 'Remove staging because the PR(#${PR_NUMBER}) has been closed' | ||
git push origin gh-pages | ||
- name: notify | ||
uses: actions/github-script@v6 | ||
if: github.event_name == 'pull_request' | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
with: | ||
script: | | ||
const { PR_NUMBER } = process.env | ||
await github.issues.createComment({ | ||
issue_number: PR_NUMBER, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `The staging https://kachick.github.io/mobu-elm/pr-${PR_NUMBER}/ has been removed.` | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Deploy products | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- 'tests/**' | ||
- '.github/workflows/test.yml' | ||
pull_request: | ||
paths-ignore: | ||
- 'tests/**' | ||
- '.github/workflows/test.yml' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: jorelali/setup-elm@v3 | ||
with: | ||
elm-version: 0.19.1 | ||
- name: install npm dependencies | ||
run: npm install | ||
- run: | | ||
staging_prefix=pr-${PR_NUMBER} | ||
cp -rf statics "docs/$staging_prefix" | ||
elm make src/Main.elm --output="docs/$staging_prefix/main.js" | ||
if: github.event_name == 'pull_request' | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
- run: | | ||
cp -rf statics "docs/latest" | ||
elm make src/Main.elm --output=docs/latest/main.js | ||
if: github.event_name != 'pull_request' | ||
- name: git setting | ||
run: | | ||
git config --local user.email "kachick1+mobu-elm@gmail.com" | ||
git config --local user.name "mobu-elm bot" | ||
- name: Deploy to GitHub Pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
DATE=`date +"%Y%m%d-%H%M-UTC"` | ||
BRANCH_NAME="deploy-$DATE" | ||
git checkout -b "$BRANCH_NAME" | ||
git add docs | ||
find . | grep -v -P '\.git(\b|ignore)|docs|LICENSE|^\.$' | xargs rm -rf | ||
git commit -m 'Update with latest code' | ||
git fetch | ||
git checkout gh-pages | ||
git merge "$BRANCH_NAME" --allow-unrelated-histories | ||
git push origin gh-pages | ||
- name: notify | ||
uses: actions/github-script@v6 | ||
if: github.event_name == 'pull_request' | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
with: | ||
script: | | ||
const { PR_NUMBER } = process.env | ||
await github.issues.createComment({ | ||
issue_number: PR_NUMBER, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `Deployed at https://kachick.github.io/mobu-elm/pr-${PR_NUMBER}/` | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '.github\workflows\.github\dependabot.yml' | ||
- '.github\workflows\deploy_products.yml' | ||
- 'MIT-LICENSE.txt' | ||
- '.editorconfig' | ||
- 'README.md' | ||
pull_request: | ||
paths-ignore: | ||
- '.github\workflows\.github\dependabot.yml' | ||
- '.github\workflows\deploy_products.yml' | ||
- 'MIT-LICENSE.txt' | ||
- '.editorconfig' | ||
- 'README.md' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: jorelali/setup-elm@v3 | ||
with: | ||
elm-version: 0.19.1 | ||
- name: install npm dependencies | ||
run: npm install | ||
- name: Test | ||
run: ./node_modules/elm-test/bin/elm-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# mobu-elm | ||
|
||
[](https://github.com/kachick/mobu-elm/actions/workflows/test_and_deploy.yml/?branch=main) | ||
[](https://open.vscode.dev/kachick/mobu-elm) | ||
|
||
A web application to manage participants and timer for mob-programming! | ||
|
||
This project currently is Just an Elm clone of [TypeScript & React](https://github.com/mobu-of-the-world/mobu), but this will overtake it in near future! | ||
|
||
Latest version is deployed at [here](https://kachick.github.io/latest/mobu-elm/) | ||
|
||
## How to check the behaviors with local | ||
|
||
```console | ||
$ elm make src/Main.elm --output=statics/main.js | ||
Success! | ||
|
||
Main ───> statics/main.js | ||
|
||
$ open ./statics/index.html | ||
Opened in your browser | ||
``` | ||
|
||
## Cat meow as the bell | ||
|
||
:cat: | ||
|
||
<a href="https://commons.wikimedia.org/wiki/File:Meow.ogg">The original uploader was Dcrosby at English Wikipedia.</a>, <a href="http://creativecommons.org/licenses/by-sa/3.0/">CC BY-SA 3.0</a>, via Wikimedia Commons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"type": "application", | ||
"source-directories": [ | ||
"src" | ||
], | ||
"elm-version": "0.19.1", | ||
"dependencies": { | ||
"direct": { | ||
"elm/browser": "1.0.2", | ||
"elm/core": "1.0.5", | ||
"elm/html": "1.0.0", | ||
"elm/json": "1.1.3", | ||
"elm/random": "1.0.0", | ||
"elm/time": "1.0.0", | ||
"elm-community/list-extra": "8.5.2", | ||
"elm-community/random-extra": "3.2.0" | ||
}, | ||
"indirect": { | ||
"elm/url": "1.0.0", | ||
"elm/virtual-dom": "1.0.2" | ||
} | ||
}, | ||
"test-dependencies": { | ||
"direct": { | ||
"elm-explorations/test": "1.2.2" | ||
}, | ||
"indirect": {} | ||
} | ||
} |
Oops, something went wrong.