chore: finalize project structure and tooling #18
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
| # ═══════════════════════════════════════════════════════════════════════════════ | |
| # Mini-Inference Engine - GitHub Pages Deployment | |
| # ═══════════════════════════════════════════════════════════════════════════════ | |
| name: Deploy GitHub Pages | |
| on: | |
| push: | |
| branches: [master, main] | |
| paths: | |
| - 'index.md' | |
| - '_config.yml' | |
| - 'Gemfile' | |
| - 'docs/**' | |
| - 'assets/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| BUNDLE_PATH: vendor/bundle | |
| jobs: | |
| build: | |
| name: Build Site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: false | |
| - name: Setup GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install Dependencies | |
| run: | | |
| bundle config set --local path '${{ env.BUNDLE_PATH }}' | |
| bundle install --jobs 4 --retry 3 | |
| - name: Build Jekyll Site | |
| run: | | |
| bundle exec jekyll build \ | |
| --baseurl "${{ steps.pages.outputs.base_path }}" \ | |
| --destination ./_site | |
| env: | |
| JEKYLL_ENV: production | |
| - name: Upload Artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./_site | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |