Adds 2023 ML intro blog posts #114
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: Deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2.2' | |
| - name: Enable bundler cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor/bundle | |
| key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gems- | |
| - name: Install deps | |
| run: | | |
| gem install bundler | |
| bundle config path vendor/bundle | |
| bundle update | |
| bundle install --jobs 4 --retry 3 | |
| npm install -g mermaid.cli | |
| - name: Setup deploy options | |
| id: setup | |
| run: | | |
| git config --global user.name "GitHub Action" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| if [[ ${GITHUB_REF} = refs/pull/*/merge ]]; then | |
| echo "SRC_BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_OUTPUT | |
| echo "NO_PUSH=--no-push" >> $GITHUB_OUTPUT | |
| elif [[ ${GITHUB_REF} = refs/heads/* ]]; then | |
| echo "SRC_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
| fi | |
| echo "DEPLOY_BRANCH=gh-pages" >> $GITHUB_OUTPUT | |
| - name: Deploy website | |
| run: | | |
| yes | bin/deploy --verbose ${{ steps.setup.outputs.NO_PUSH }} \ | |
| --src ${{ steps.setup.outputs.SRC_BRANCH }} \ | |
| --deploy ${{ steps.setup.outputs.DEPLOY_BRANCH }} |