Skip to content

Commit 93de812

Browse files
authored
Merge branch 'main' into dht
2 parents 5379a8d + 3dd66f5 commit 93de812

File tree

17 files changed

+1499
-324
lines changed

17 files changed

+1499
-324
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
name: Build and Deploy
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
28

3-
# Explicitly declare permissions
49
permissions:
510
contents: read
6-
pull-requests: write
7-
statuses: write
811

912
on:
1013
push:
@@ -19,16 +22,16 @@ env:
1922

2023
concurrency:
2124
group: ${{ github.workflow }}-${{ github.ref }}
22-
cancel-in-progress: true # Cancel in progress runs if a new run is started
25+
cancel-in-progress: true
2326

2427
jobs:
25-
build-and-deploy:
28+
build:
2629
runs-on: ubuntu-latest
27-
outputs:
28-
cid: ${{ steps.deploy.outputs.cid }}
2930
steps:
3031
- name: Checkout code
3132
uses: actions/checkout@v4
33+
with:
34+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
3235

3336
- name: Setup Node.js
3437
uses: actions/setup-node@v4
@@ -42,50 +45,10 @@ jobs:
4245
- name: Build project
4346
run: make website
4447

45-
- name: Upload static files as artifact
46-
id: upload-artifact
47-
uses: actions/upload-pages-artifact@v3
48+
# Upload artifact for deploy workflow
49+
- name: Upload build artifact
50+
uses: actions/upload-artifact@v4
4851
with:
52+
name: website-build-${{ github.run_id }}
4953
path: ${{ env.BUILD_PATH }}
50-
51-
- uses: ipfs/ipfs-deploy-action@v1
52-
name: Deploy to IPFS Mirror Providers
53-
id: deploy
54-
with:
55-
path-to-deploy: ${{ env.BUILD_PATH }}
56-
cluster-url: "/dnsaddr/ipfs-websites.collab.ipfscluster.io"
57-
cluster-user: ${{ secrets.CLUSTER_USER }}
58-
cluster-password: ${{ secrets.CLUSTER_PASSWORD }}
59-
storacha-key: ${{ secrets.STORACHA_KEY }}
60-
storacha-proof: ${{ secrets.STORACHA_PROOF }}
61-
#TODO pinata-jwt-token: ${{ secrets.PINATA_JWT_TOKEN }}
62-
github-token: ${{ github.token }}
63-
64-
# TODO: right now, DNSLink is controlled by Fleek, and we use ipfs/ipfs-deploy-action for PR previews
65-
#- name: Update DNSLink
66-
# if: false # TODO github.ref == 'refs/heads/main' # only update DNSLink for main branch
67-
# uses: ipfs/[email protected]
68-
# with:
69-
# cid: ${{ steps.deploy.outputs.cid }}
70-
# dnslink_domain: 'specs.ipfs.tech'
71-
# cf_record_id: ${{ secrets.CF_RECORD_ID }}
72-
# cf_zone_id: ${{ secrets.CF_ZONE_ID }}
73-
# cf_auth_token: ${{ secrets.CF_AUTH_TOKEN }}
74-
# github_token: ${{ github.token }}
75-
# set_github_status: true
76-
77-
78-
gh-pages:
79-
runs-on: 'ubuntu-latest'
80-
needs: build-and-deploy
81-
if: github.ref == 'refs/heads/main' # only deploy to gh-pages for main branch
82-
permissions:
83-
pages: write # to deploy to Pages
84-
id-token: write # to verify the deployment originates from an appropriate source
85-
environment:
86-
name: 'github-pages'
87-
url: ${{ steps.deployment.outputs.page_url }}
88-
steps:
89-
- name: Deploy to GitHub Pages
90-
id: deployment
91-
uses: actions/deploy-pages@v4
54+
retention-days: 1

.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/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

.markdownlint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
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
1213
}

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

KEYCHAIN.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) The Keychain
22

3+
> [!NOTE]
4+
> This is a work-in-progress specification from the early days of IPFS that was never completed. It remains here for historical reference.
5+
36
**Authors(s)**:
47
- [Juan Benet](github.com/jbenet)
58

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The specs contained in this and related repositories are:
3535

3636
- **IPFS Protocol:**
3737
- [IPFS Guide](https://docs.ipfs.tech/) - to start your IPFS journey
38-
- [Protocol Architecture Overview](./ARCHITECTURE.md) - the top-level spec and the stack
38+
- [Protocol Architecture Overview (Historical Notes from ~2015)](./ARCHITECTURE.md) - the top-level spec and the stack
3939
- **User Interface (aka Public APIs):**
4040
- [HTTP Gateways](https://specs.ipfs.tech/http-gateways/) - implementation agnostic interfaces for accessing content-addressed data over HTTP
4141
- [Routing V1](https://specs.ipfs.tech/routing/http-routing-v1/) - implementation agnostic interfaces for content/peer/IPNS routing over HTTP
@@ -45,31 +45,31 @@ The specs contained in this and related repositories are:
4545
- [IPLD](https://ipld.io/specs/) - InterPlanetary Linked Data.
4646
- [DAG-CBOR](https://ipld.io/docs/codecs/known/dag-cbor/) - binary format, supporting the complete IPLD Data Model, with excellent performance, and suitable for any job.
4747
- [DAG-JSON](https://ipld.io/docs/codecs/known/dag-json/) - human-readable format, supporting almost the complete IPLD Data Model, and very convenient for interoperability, development, and debugging.
48-
- [DAG-PB](https://ipld.io/docs/codecs/known/dag-pb/) - a binary format for specific limited structures of data, which is highly used in IPFS and [UnixFS](./UNIXFS.md).
48+
- [DAG-PB](https://ipld.io/docs/codecs/known/dag-pb/) - a binary format for specific limited structures of data, which is highly used in IPFS and [UnixFS](https://specs.ipfs.tech/unixfs/).
4949
- [CAR](https://ipld.io/specs/transport/car/) - transport format used to store content addressable objects in the form of IPLD block data as a sequence of bytes; typically as an [application/vnd.ipld.car](https://www.iana.org/assignments/media-types/application/vnd.ipld.car) file with a `.car` extension
5050
- Self Describing Formats ([multiformats](http://github.com/multiformats/multiformats)):
5151
- [multihash](https://github.com/multiformats/multihash) - self-describing hash digest format.
5252
- [multiaddr](https://github.com/multiformats/multiaddr) - self-describing addressing format.
5353
- [multicodec](https://github.com/multiformats/multicodec) - self-describing protocol/encoding streams (note: a file is a stream).
5454
- [multistream](https://github.com/multiformats/multistream) - multistream is a format -- or simple protocol -- for disambiguating, and layering streams. It is extremely simple.
5555
- **Files and Directories:**
56-
- [UnixFS](./UNIXFS.md)
56+
- [UnixFS](https://specs.ipfs.tech/unixfs/)
5757
- Related userland concepts (external docs):
5858
- [MFS, Mutable File System, or the Files API](https://docs.ipfs.tech/concepts/file-systems/#mutable-file-system-mfs)
5959
- **Storage Layer:**
6060
- [Pinning Service API](https://ipfs.github.io/pinning-services-api-spec/)
61-
- [Repo](./REPO.md) - IPFS node local repository spec
62-
- [FileSystem Repo](./REPO_FS.md) - IPFS node local repository spec
61+
- [Repo](https://github.com/ipfs/kubo/blob/master/docs/specifications/repository.md) - Kubo-specific local repository implementation details
62+
- [FileSystem Repo](https://github.com/ipfs/kubo/blob/master/docs/specifications/repository_fs.md) - Kubo-specific filesystem repository implementation
6363
- **Block Exchanges:**
64-
- [Bitswap](./BITSWAP.md) - BitTorrent-inspired exchange
64+
- [Bitswap](https://specs.ipfs.tech/bitswap-protocol/) - BitTorrent-inspired exchange
6565
- **Key Management:**
66-
- [KeyStore](./KEYSTORE.md) - Key management on IPFS
66+
- [KeyStore](https://github.com/ipfs/kubo/blob/master/docs/specifications/keystore.md) - Kubo-specific key management implementation
6767
- [KeyChain](./KEYCHAIN.md) - Distribution of cryptographic Artifacts
6868
- **Networking layer:**
6969
- [libp2p](https://github.com/libp2p/specs) - libp2p is a modular and extensible network stack, built and use by IPFS, but that it can be reused as a standalone project. Covers:
7070
- **Records, Naming and Record Systems:**
7171
- [IPNS](https://specs.ipfs.tech/ipns/) - InterPlanetary Naming System
72-
- [IPNS Record Creation and Verification](https://specs.ipfs.tech/ipns/ipns-pubsub-router/)
72+
- [IPNS Record Creation and Verification](https://specs.ipfs.tech/ipns/ipns-record/)
7373
- [IPNS over PubSub](https://specs.ipfs.tech/ipns/ipns-pubsub-router/)
7474
- [DNSLink](https://dnslink.dev) - mapping DNS names to IPFS content paths
7575
- [DNSAddr](https://github.com/multiformats/multiaddr/blob/master/protocols/DNSADDR.md) - mapping DNS names to libp2p multiaddrs

0 commit comments

Comments
 (0)