⭐ 터틀 트레이딩 (마이클 코벨, 2019) #16
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Build quotes | |
on: | |
push: | |
branches: [ "master" ] | |
env: | |
USE_GLOBAL_ELIXIR: true | |
MIX_ENV: dev | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: build tbot-800.ex | |
runs-on: ubuntu-latest | |
strategy: | |
# Specify the OTP and Elixir versions to use when building | |
# and running the workflow steps. | |
matrix: | |
otp: ['26.2.5.3'] # Define the OTP version [required] | |
elixir: ['1.16.3'] # Define the elixir version [required] | |
steps: | |
- name: Checkout tbot-800.ex | |
uses: actions/checkout@v3 | |
with: | |
repository: ohyecloudy/tbot-800.ex | |
path: tbot_800 | |
- name: Checkout ${{ github.repository }} | |
uses: actions/checkout@v3 | |
with: | |
path: quotes | |
# Step: Setup Elixir + Erlang image as the base. | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: tbot_800/deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Build quotes | |
run: | | |
cd tbot_800 | |
script/quote-build ${{ github.workspace }}/quotes/src/q-src.exs\ | |
ohyecloudy\ | |
https://ohrepos.github.io/quotes-repo/quotes/\ | |
G-5VTWJXN1BH\ | |
${{ github.workspace }}/tweet_items.exs\ | |
${{ github.workspace }}/quotes | |
- name: Checkout ${{ github.repository }} gh-pages branch | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
path: output | |
- name: Commit results | |
run: | | |
mv ${{ github.workspace }}/quotes/*.* ${{ github.workspace }}/output/quotes | |
mv ${{ github.workspace }}/tweet_items.exs ${{ github.workspace }}/output/quotes/ | |
cd ${{ github.workspace }}/output | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
if [[ -n $(git status --porcelain) ]]; then | |
git commit -m "Github actions build" | |
git push | |
else | |
echo "nothing to commit" | |
exit 0 | |
fi |