···11-# These are supported funding model platforms
22-ko_fi: stelclementine
-93
.github/workflows/astro.yml
···11-# Sample workflow for building and deploying an Astro site to GitHub Pages
22-#
33-# To get started with Astro see: https://docs.astro.build/en/getting-started/
44-#
55-name: Deploy Astro site to Pages
66-77-on:
88- # Runs on pushes targeting the default branch
99- push:
1010- branches: ['main']
1111-1212- # Allows you to run this workflow manually from the Actions tab
1313- workflow_dispatch:
1414-1515-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1616-permissions:
1717- contents: read
1818- pages: write
1919- id-token: write
2020-2121-# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2222-# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2323-concurrency:
2424- group: 'pages'
2525- cancel-in-progress: false
2626-2727-env:
2828- BUILD_PATH: '.' # default value when not using subfolders
2929- # BUILD_PATH: subfolder
3030-3131-jobs:
3232- build:
3333- name: Build
3434- runs-on: ubuntu-latest
3535- steps:
3636- - name: Checkout
3737- uses: actions/checkout@v4
3838- - name: Detect package manager
3939- id: detect-package-manager
4040- run: |
4141- if [ -f "${{ github.workspace }}/yarn.lock" ]; then
4242- echo "manager=yarn" >> $GITHUB_OUTPUT
4343- echo "command=install" >> $GITHUB_OUTPUT
4444- echo "runner=yarn" >> $GITHUB_OUTPUT
4545- echo "lockfile=yarn.lock" >> $GITHUB_OUTPUT
4646- exit 0
4747- elif [ -f "${{ github.workspace }}/package.json" ]; then
4848- echo "manager=npm" >> $GITHUB_OUTPUT
4949- echo "command=ci" >> $GITHUB_OUTPUT
5050- echo "runner=npx --no-install" >> $GITHUB_OUTPUT
5151- echo "lockfile=package-lock.json" >> $GITHUB_OUTPUT
5252- exit 0
5353- else
5454- echo "Unable to determine package manager"
5555- exit 1
5656- fi
5757- - name: Setup Node
5858- uses: actions/setup-node@v4
5959- with:
6060- node-version: '20'
6161- cache: ${{ steps.detect-package-manager.outputs.manager }}
6262- cache-dependency-path: ${{ env.BUILD_PATH }}/${{ steps.detect-package-manager.outputs.lockfile }}
6363- - name: Setup Pages
6464- id: pages
6565- uses: actions/configure-pages@v5
6666- - name: Install dependencies
6767- run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
6868- working-directory: ${{ env.BUILD_PATH }}
6969- - name: Build with Astro
7070- run: |
7171- ${{ steps.detect-package-manager.outputs.runner }} astro build \
7272- --site "${{ steps.pages.outputs.origin }}" \
7373- --base "${{ steps.pages.outputs.base_path }}"
7474- - name: Build Pagefind Index
7575- run: |
7676- ${{ steps.detect-package-manager.outputs.runner }} pagefind --site dist
7777- working-directory: ${{ env.BUILD_PATH }}
7878- - name: Upload artifact
7979- uses: actions/upload-pages-artifact@v3
8080- with:
8181- path: ${{ env.BUILD_PATH }}/dist
8282-8383- deploy:
8484- environment:
8585- name: github-pages
8686- url: ${{ steps.deployment.outputs.page_url }}
8787- needs: build
8888- runs-on: ubuntu-latest
8989- name: Deploy
9090- steps:
9191- - name: Deploy to GitHub Pages
9292- id: deployment
9393- uses: actions/deploy-pages@v4
+1-1
src/content/posts/pythons-generators-and-yield.md
···11---
22title: "Python's Generators and Yield"
33published: 2025-07-11
44-draft: false
44+draft: true
55description: 'Learn how to use generators and the yield keyword in Python for efficient iteration.'
66series: 'Python Basics'
77tags: ['python']