Skip to content

Build Freenet Website #4

Build Freenet Website

Build Freenet Website #4

Workflow file for this run

name: Build IPFS Website
on:
workflow_dispatch:
permissions:
contents: read
statuses: write
jobs:
build:
runs-on: ubuntu-latest
environment:
name: dweb
url: https://cloudflare-ipfs.com/ipns/ipfs.privacyguides.org/en/index.html
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: "false"
- name: Python setup
uses: actions/setup-python@v5
- name: Install Python dependencies
run: |
pip install mkdocs-material
sudo apt install pngquant
- name: Build website
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARDS: false
run: |
mkdocs build --config-file config/mkdocs-offline.yml
mkdocs --version
- id: deploy
run: |
wget https://dist.ipfs.tech/ipfs-cluster-ctl/v1.0.8/ipfs-cluster-ctl_v1.0.8_linux-amd64.tar.gz
tar xvf ipfs-cluster-ctl_v1.0.8_linux-amd64.tar.gz
./ipfs-cluster-ctl/ipfs-cluster-ctl --version
root_cid=$(./ipfs-cluster-ctl/ipfs-cluster-ctl \
--host '/dns/cluster.ipfs.jonaharagon.net/tcp/443/tls/sni/cluster.ipfs.jonaharagon.net' \
--basic-auth ${{ secrets.CLUSTER_USERNAME }}:${{ secrets.CLUSTER_PASSWORD }} \
add \
--quieter \
--local \
--wait \
--cid-version 1 \
--name "https://github.com/$GITHUB_REPOSITORY/commits/$GITHUB_SHA" \
--recursive site )
echo "cid=$root_cid" >> $GITHUB_OUTPUT
# - id: cluster_deploy
# uses: ipfs-shipyard/[email protected]
# with:
# path_to_add: site
# cluster_host: /dns/cluster.ipfs.jonaharagon.net/tcp/443
# cluster_user: ${{ secrets.CLUSTER_USERNAME }}
# cluster_password: ${{ secrets.CLUSTER_PASSWORD }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: textileio/cloudflare-update-dnslink@30414a408191218c8259e932ebdf4cbb7c652fe8
with:
cid: ${{ steps.deploy.outputs.cid }}
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE }}
RECORD_DOMAIN: privacyguides.org
RECORD_NAME: _dnslink.ipfs