consolidate week1 and week2 solution into one package #50
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: CI (main) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: setup rust toolchain | |
| run: rustup update && rustup toolchain install | |
| - uses: taiki-e/install-action@mdbook | |
| - name: patch for gh-pages build | |
| run: mv book/theme/head.hbs._ book/theme/head.hbs | |
| - name: build book | |
| run: cd book && mdbook build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: book/book | |
| deploy: | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-22.04 | |
| if: github.repository == 'skyzh/tiny-llm' | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |