Deploy cross-build metadata file through GitHub Pages site#5642
Deploy cross-build metadata file through GitHub Pages site#5642agriyakhetarpal merged 5 commits intomainfrom
Conversation
821e0a8 to
7554b44
Compare
What do you want? No force push? |
|
I set the default branch protection rule on it. |
Since you tagged me, I'll add my two cents! I'd say a better solution would be to have an action deploy that file from Something like this would work, I think: name: Deploy pyodide-cross-build-environments.json to Pages
on:
push:
branches:
- main
paths:
# Only runs if this specific file changes
- pyodide-cross-build-environments.json
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}/api/pyodide-cross-build-environments.json
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Prepare artifact
run: |
mkdir -p ./_site/api
cp pyodide-cross-build-environments.json ./_site/api/pyodide-cross-build-environments.json
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 |
Great suggestion, thank you, @joerick! I think this makes sense to me, I'll switch to your action instead. Just one clarification: doing this will only prevent the extra PR, as the file is in the gh-pages branch and can be edited at any time, even right now. Once I change to your suggestion, I'll move from "Deploy from a branch" to "GitHub Actions". |
This reverts commit 7554b44.
Co-Authored-By: Joe Rickerby <1244307+joerick@users.noreply.github.com>
for more information, see https://pre-commit.ci
Actually, this is no longer needed – we can drop the Edit 2: I can't delete it as it's now a protected branch – could you delete it from https://github.com/pyodide/pyodide/branches? |
|
I haven't added |
|
We'll have to merge this to trigger the change, so I shall press the button for now! I've updated the PR title and description accordingly. |
|
I triggered a successful run through a manual trigger: https://github.com/pyodide/pyodide/actions/runs/15116045722 The metadata file is live at https://pyodide.github.io/pyodide/api/pyodide-cross-build-environments.json |
Description
This PR adds a GitHub Pages workflow that runs from the
mainbranch in order to deploy the cross-build metadata file through pyodide.github.io, in order to circumvent GitHub's rate limits against unauthorised requests.See pyodide/pyodide-build#203 and pypa/cibuildwheel#2002 for more information.
This should trigger on each push to the
mainbranch, so that we can edit the metadata file with ease and it will automatically deploy after that. I've also addedworkflow_dispatch:trigger and a CRON job one.@hoodmane and @ryanking, could either of you set up branch protection rules for this
gh-pagesbranch?cc @joerick (and h/t for the idea!)
Checklists