Workflow uses python2.7 by default, fixed

I used this documentation to change the python version, but I got an error that version 3.7 did not exist. So I tried 3.10, 3.9, 3.6, until I hit on 3.8. Please update the docs.

Hi @rogerjbos

The blog post you linked to is from 2016.

Official documentation for managing Python dependencies is part of Netlify Docs

This documentation links to the currently available build images. The latest Focal (xenial is retiring) uses Python version 3.8 by default as shown in the Included Software list


Thanks for the quick response. Sorry to link to a blog post, but I got that link from an answer to someone else’s question that referred to that link as the docs. So my followup question would be why does my workflows file pasted below default to Python 2.7 if I don’t include a runtime.txt file?

I was following the Quarto docs and they never mention the runtime.txt file.



    branches: main

name: Quarto Publish

    runs-on: ubuntu-latest
      - name: Check out repository
        uses: actions/checkout@v2 

      - name: Set up Quarto
        uses: quarto-dev/quarto-actions/setup@v2
      - name: Install Python and Dependencies
        uses: actions/setup-python@v4
          python-version: '3.10'
          cache: 'pip'
      - run: pip install jupyter
      - run: pip install -r requirements.txt
      - name: Render and Publish 
        uses: quarto-dev/quarto-actions/publish@v2
          target: netlify

Other than playing with a Fibonacci script about 15 (or more) years ago (think it ran for a few days) Python isn’t something I work with.
I haven’t extensively used workflows (keep thinking about it thought), but from what I know, this action is using GitHub to build, then publish to Netlify, rather than triggering a build on Netlify.

Perhaps the actions/setup-python repository could provide more relevant information


Thanks again for the reply. So you are saying that even though I watch it being the website being built and see the log file on Netlify, it is actually being built on GitHub?

If you have your git repository linked to Netlify, as per Quarto’s Publish from Git Provider documentation, then the site is built by Netlify. As it says

Netlify has the ability to automatically deploy sites when change are committed to Git repositories hosted on GitHub, GitLab, Bitbucket, and Azure DevOps.

If you are using the GitHub Action from Quarto’s documentation, this is using GitHub

Another option is to use GitHub Actions to render and publish your site (you might prefer this if you want execution and/or rendering to be automatically triggered from commits).

The workflow from Quarto’s documentation you have used above is title Publish Action.

So yes, that action is building on GitHub and publishing to Netlify. If you would prefer to have the build done by Netlify instead check out Netlify’s Deploy with Git documentation or follow Quarto’s Publish from Git Provider documentation as linked above.