Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
Merge branch 'deploy-20220513-1346-UTC' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mobu-elm bot committed May 13, 2022
2 parents 11c7150 + c2e9def commit ab9c6fd
Show file tree
Hide file tree
Showing 15 changed files with 1,525 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
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
20 changes: 20 additions & 0 deletions .github/dependabot.yml
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"
40 changes: 40 additions & 0 deletions .github/workflows/cleanup_staging.yml
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.`
})
64 changes: 64 additions & 0 deletions .github/workflows/deploy_products.yml
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}/`
})
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
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
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# mobu-elm

[![Build Status](https://github.com/kachick/mobu-elm/actions/workflows/test_and_deploy.yml/badge.svg?branch=main)](https://github.com/kachick/mobu-elm/actions/workflows/test_and_deploy.yml/?branch=main)
[![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](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
29 changes: 29 additions & 0 deletions elm.json
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": {}
}
}
Loading

0 comments on commit ab9c6fd

Please sign in to comment.