fix: フィク #47
This file contains hidden or 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
| name: Templated Pages Generation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "data/*.yaml" | |
| - "template/*.thtm" | |
| - "template/*.css" | |
| - "tools/thinkio_webtool/misc/manualRun.txt" | |
| defaults: | |
| run: | |
| working-directory: "./tools/thinkio_webtool" | |
| env: | |
| LANG: "ja_JP.UTF-8" | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: initialize locale | |
| run: | | |
| sudo locale-gen ja_JP.UTF-8 | |
| sudo update-locale LANG=ja_JP.UTF-8 | |
| - uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: 3.7 | |
| - name: install dependencies | |
| run: dart pub get | |
| - name: generate | |
| run: | | |
| set -x | |
| sudo locale-gen ja_JP.UTF-8 | |
| sudo update-locale LANG=ja_JP.UTF-8 | |
| LOG_FILE="./../../log/gen/"`date '+%Y%m%d_%H%M'`".log" | |
| if [ ! -d "./../../log/gen/" ]; then | |
| mkdir -p "./../../log/gen/" | |
| fi | |
| touch ${LOG_FILE} | |
| dart run bin/gen_pages.dart >> $LOG_FILE | |
| STAT=`echo $?` | |
| echo $STAT | |
| cat ${LOG_FILE} | |
| continue-on-error: true | |
| - name: Diff | |
| id: diff | |
| run: | | |
| git add -N . | |
| git diff --name-only --exit-code | |
| continue-on-error: true | |
| working-directory: "./" | |
| - name: Commit & Push | |
| run: | | |
| set -x | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| git add . | |
| git commit --author=. -m 'generated' | |
| git push | |
| working-directory: "./" | |
| if: steps.diff.outcome == 'failure' |