Skip to content

Commit a0ec721

Browse files
authored
Merge branch 'main' into feat/ipip-accept-vs-format
2 parents f76b2d5 + ebf5e86 commit a0ec721

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+13660
-435
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Build workflow - runs for both PRs and main branch pushes
2+
# This workflow builds the website without access to secrets
3+
# For PRs: Runs on untrusted fork code safely (using pull_request event, not pull_request_target)
4+
# For main: Builds and uploads artifacts for deployment
5+
# Artifacts are passed to the deploy workflow which has access to secrets
6+
7+
name: Build
8+
9+
permissions:
10+
contents: read
11+
12+
on:
13+
push:
14+
branches:
15+
- main
16+
pull_request:
17+
branches:
18+
- main
19+
20+
env:
21+
BUILD_PATH: 'out'
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
with:
34+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '20'
40+
cache: 'npm'
41+
42+
- name: Install dependencies
43+
run: npm ci --prefer-offline --no-audit --progress=false
44+
45+
- name: Build project
46+
run: make website
47+
48+
# Upload artifact for deploy workflow
49+
- name: Upload build artifact
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: website-build-${{ github.run_id }}
53+
path: ${{ env.BUILD_PATH }}
54+
retention-days: 1
55+
include-hidden-files: true

.github/workflows/deploy.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Deploy workflow - triggered by workflow_run after successful build
2+
# This workflow has access to secrets but never executes untrusted code
3+
# It only downloads and deploys pre-built artifacts from the build workflow
4+
# Security: Fork code cannot access secrets as it only runs in build workflow
5+
# Deploys to IPFS for all branches and GitHub Pages for main branch only
6+
7+
name: Deploy
8+
9+
# Explicitly declare permissions
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
statuses: write
14+
15+
on:
16+
workflow_run:
17+
workflows: ["Build"]
18+
types: [completed]
19+
20+
env:
21+
BUILD_PATH: 'website-build'
22+
23+
jobs:
24+
deploy-ipfs:
25+
if: github.event.workflow_run.conclusion == 'success'
26+
runs-on: ubuntu-latest
27+
outputs:
28+
cid: ${{ steps.deploy.outputs.cid }}
29+
steps:
30+
- name: Download build artifact
31+
uses: actions/download-artifact@v4
32+
with:
33+
name: website-build-${{ github.event.workflow_run.id }}
34+
path: ${{ env.BUILD_PATH }}
35+
run-id: ${{ github.event.workflow_run.id }}
36+
github-token: ${{ github.token }}
37+
38+
- name: Deploy to IPFS Mirror Providers
39+
uses: ipshipyard/ipfs-deploy-action@v1
40+
id: deploy
41+
with:
42+
path-to-deploy: ${{ env.BUILD_PATH }}
43+
cluster-url: "/dnsaddr/ipfs-websites.collab.ipfscluster.io"
44+
cluster-user: ${{ secrets.CLUSTER_USER }}
45+
cluster-password: ${{ secrets.CLUSTER_PASSWORD }}
46+
storacha-key: ${{ secrets.STORACHA_KEY }}
47+
storacha-proof: ${{ secrets.STORACHA_PROOF }}
48+
#TODO pinata-jwt-token: ${{ secrets.PINATA_JWT_TOKEN }}
49+
github-token: ${{ github.token }}
50+
51+
# TODO: right now, DNSLink is controlled by Fleek, and we use ipfs/ipfs-deploy-action for PR previews
52+
#- name: Update DNSLink
53+
# if: github.event.workflow_run.head_branch == 'main'
54+
# uses: ipfs/[email protected]
55+
# with:
56+
# cid: ${{ steps.deploy.outputs.cid }}
57+
# dnslink_domain: 'specs.ipfs.tech'
58+
# cf_record_id: ${{ secrets.CF_RECORD_ID }}
59+
# cf_zone_id: ${{ secrets.CF_ZONE_ID }}
60+
# cf_auth_token: ${{ secrets.CF_AUTH_TOKEN }}
61+
# github_token: ${{ github.token }}
62+
# set_github_status: true
63+
64+
deploy-gh-pages:
65+
if: |
66+
github.event.workflow_run.conclusion == 'success' &&
67+
github.event.workflow_run.head_branch == 'main'
68+
runs-on: ubuntu-latest
69+
permissions:
70+
pages: write
71+
id-token: write
72+
environment:
73+
name: github-pages
74+
url: ${{ steps.deployment.outputs.page_url }}
75+
steps:
76+
- name: Download build artifact
77+
uses: actions/download-artifact@v4
78+
with:
79+
name: website-build-${{ github.event.workflow_run.id }}
80+
path: website-build
81+
run-id: ${{ github.event.workflow_run.id }}
82+
github-token: ${{ github.token }}
83+
84+
- name: Upload Pages artifact
85+
uses: actions/upload-pages-artifact@v3
86+
with:
87+
path: website-build
88+
89+
- name: Deploy to GitHub Pages
90+
id: deployment
91+
uses: actions/deploy-pages@v4

.github/workflows/generated-pr.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Close Generated PRs
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
stale:
14+
uses: ipdxco/unified-github-workflows/.github/workflows/reusable-generated-pr.yml@v1

.github/workflows/linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout Code
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
with:
1919
# Full git history is needed to get a proper list of changed files within `super-linter`
2020
fetch-depth: 0
2121
- name: Lint
22-
uses: github/super-linter/slim@v4
22+
uses: super-linter/super-linter/slim@v7
2323
env:
2424
LINTER_RULES_PATH: '.'
2525
MARKDOWN_CONFIG_FILE: .markdownlint.json

.github/workflows/stale.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
name: Close and mark stale issue
1+
name: Close Stale Issues
22

33
on:
44
schedule:
55
- cron: '0 0 * * *'
6+
workflow_dispatch:
67

78
permissions:
89
issues: write
910
pull-requests: write
1011

1112
jobs:
1213
stale:
13-
uses: pl-strflt/.github/.github/workflows/reusable-stale-issue.yml@v0.3
14+
uses: ipdxco/unified-github-workflows/.github/workflows/reusable-stale-issue.yml@v1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
out/
2+
node_modules/
23
super-linter.log
4+
node_modules/

.markdownlint.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
"blanks-around-lists": false,
99
"single-trailing-newline": false,
1010
"link-fragments": false,
11-
"line-length": false
11+
"line-length": false,
12+
"blanks-around-fences": false,
13+
"no-inline-html": false
1214
}

ARCHITECTURE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ![](https://img.shields.io/badge/status-wip-orange.svg?style=flat-square) IPFS Architecture Overview
22

3+
> [!NOTE]
4+
> This document contains historical notes about IPFS architecture from ~2015. For current specifications, please refer to https://specs.ipfs.tech/
35
46
**Authors(s)**:
57
- [Juan Benet](https://github.com/jbenet)

DWEB_ADDRESSING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ![](https://img.shields.io/badge/status-wip-orange.svg?style=flat-square) Addressing on the Decentralized Web
22

3+
> [!NOTE]
4+
> This is an incomplete work-in-progress document from the early days of IPFS. For current addressing specifications, please refer to https://specs.ipfs.tech/
5+
36
**Authors(s)**:
47
- [Lars Gierth](mailto:[email protected])
58

IMPORTERS_EXPORTERS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ![](https://img.shields.io/badge/status-wip-orange.svg?style=flat-square) Data Importers & Exporters
22

3+
> [!NOTE]
4+
> This is a work-in-progress specification from the early days of IPFS. For current UnixFS and data import specifications, please refer to https://specs.ipfs.tech/unixfs/
5+
36
**Authors(s)**:
47
- David Dias
58
- Juan Benet
@@ -43,7 +46,7 @@ Essentially, data importing is divided into two parts:
4346
- Splitters - The chunking algorithms applied to each file, these can be:
4447
- fixed size chunking (also known as dumb chunking)
4548
- rabin fingerprinting
46-
- dedicated format chunking, these require knowledge of the format and typically only work with certain time of files (e.g. video, audio, images, etc)
49+
- dedicated format chunking, these require knowledge of the format and typically only work with certain type of files (e.g. video, audio, images, etc)
4750
- special data structures chunking, formats like, tar, pdf, doc, container and/org vm images fall into this category
4851

4952
### Goals

0 commit comments

Comments
 (0)