Skip to content

Commit 89c9c62

Browse files
authored
Merge branch 'main' into patch-1
2 parents 70514b9 + d5638bc commit 89c9c62

46 files changed

Lines changed: 3116 additions & 1434 deletions

Some content is hidden

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

.github/workflows/build.yml

Lines changed: 17 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,11 @@ 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/dnslink-action@v0.1
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
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/dnslink-action@v0.1
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ 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

.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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
out/
22
node_modules/
33
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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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
4-
**Authors(s)**:
6+
**Author(s)**:
57
- [Juan Benet](https://github.com/jbenet)
68
- [David Dias](https://github.com/daviddias)
79

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:lgierth@ipfs.io)
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)