Skip to content

Allow disabling of all network accesses - #285

Merged
jekyllbot merged 3 commits into
jekyll:mainfrom
ibbem:feature/disable-network-access
Mar 24, 2025
Merged

Allow disabling of all network accesses#285
jekyllbot merged 3 commits into
jekyll:mainfrom
ibbem:feature/disable-network-access

Conversation

@ibbem

Copy link
Copy Markdown
Contributor

Context

We use Nix to build our project reproducibly, including the github-pages documentation. This setup is also used in our CI to build the github-pages which are eventually deployed. Nix prohibits network connections (except if the output hash is specified, which is unpractical in this case) because the network is not reproducible. However, in some circumstances (e.g., the default installation on macOS) the Nix sandbox is disabled or weakened. Hence, github-metadata accesses the network which results in failing builds or differing outputs.

Feature Request

We would like to reliably disable network accesses without actually disabling the network.

Implemented solution

Network accesses are skipped if the environment variable PAGES_DISABLE_NETWORK is set.

Related issues

@ashmaroli

Copy link
Copy Markdown
Member

Hello @ibbem, please revert the change to History.markdown. It gets updated automatically with the pull-request-title when the pull request is merged. Additionally, this requires a test to verify that setting the env var does what is intended.

P.S. You need not rebase your branch. All commits will be squashed automatically at merge.

@ibbem

Copy link
Copy Markdown
ContributorAuthor

From my side, this PR is ready to be (squash) merged.
Is there anything else that I need to address?

@ashmaroli

Copy link
Copy Markdown
Member

No @ibbem, this LGTM!
Thank you for your contribution.

@jekyllbot: merge +minor

@jekyllbot
jekyllbot merged commit 17cc5af into jekyll:mainMar 24, 2025
jekyllbot added a commit that referenced this pull request Mar 24, 2025
@jekylljekyll locked and limited conversation to collaborators Mar 24, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ibbem@ashmaroli@parkr@jekyllbot