Skip to content

Commit

Permalink
fix: update readme and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Jul 20, 2020
1 parent 7772764 commit 455eafb
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 129 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/ipfs.yml

This file was deleted.

90 changes: 32 additions & 58 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,44 @@
name: github pages deploy
name: CI

on:
push:
branches:
- master
on: [push]

jobs:
build-deploy:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- uses: actions/checkout@v2

- uses: webfactory/ssh-agent@v0.2.0
- uses: actions/setup-go@v2
with:
ssh-private-key: ${{ secrets.ACTIONS_DEPLOY_KEY }}

- name: Install Go
run: |
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
sudo rm -rf /usr/local/go
sudo rm -rf /usr/local/go1.12
sudo rm -rf /usr/local/go1.27
sudo apt-get update
wget https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz
sudo tar -xvf go1.14.4.linux-amd64.tar.gz
sudo chown -R root:root ./go
sudo cp -r go /usr/local
sudo cp -r go /usr/local/go1.12
sudo cp -r go /usr/local/go1.27
sudo ln -sf /usr/local/go/bin/go /usr/bin/go
sudo echo 'GOROOT=/usr/local/go' >> ~/.profile
sudo echo 'GOPATH=$HOME/work' >>~/.profile
sudo echo 'PATH=$GOROOT/bin:$GOPATH/bin' >>~/.profile
source ~/.profile
- name: Debug
run: |
pwd
go env
which go
go version
- name: Install deps-ga
run: |
sudo make deps-ga
go-version: '1.14'

- name: Build
run: |
sudo chown -R root:root /home/runner/work/specs
sudo make build
- name: Deploy using SSH
- uses: actions/setup-node@v2-beta
with:
node-version: '12'

- run: npm install
- run: npm run build

# Pin the built site to ipfs-cluster, output the cid as `steps.ipfs.outputs.cid`
# see: https://github.com/ipfs-shipyard/ipfs-github-action
- uses: ipfs-shipyard/ipfs-github-action@v1.0.0
id: ipfs
with:
path_to_add: public
cluster_host: /dnsaddr/cluster.ipfs.io
cluster_user: ${{ secrets.CLUSTER_USER }}
cluster_password: ${{ secrets.CLUSTER_PASSWORD }}
env:
DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo chown -R runner /home/runner/work/specs/specs
sudo chown -R runner .git/
eval "$(ssh-agent -s)"
ssh-add - <<< "${DEPLOY_KEY}"

- run: echo /ipfs/${{ steps.ipfs.outputs.cid }}

git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git config --local user.email "no-reply-spec-deploy@protocol.ai"
git config --local user.name "no-reply-spec-deploy"
- run: echo ${{ github.ref }}

bin/publish-to-gh-pages.sh
# This branch updates a dnslink for a domain if the current branch should be deployed to prod.
# see https://github.com/ipfs-shipyard/js-dnslink-dnsimple
- run: npx dnslink-dnsimple --domain beta.spec.filecoin.io --link /ipfs/${{ steps.ipfs.outputs.cid }}
env:
DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }}
# TODO: change to master once merged.
if: github.ref == 'refs/heads/feat/new-setup'
90 changes: 63 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Filecoin Specification

This is the [Filecoin Specification](https://github.com/filecoin-project/specs), a repository that contains documents, code, models, and diagrams that constitute the specification of the [Filecoin Protocol](https://filecoin.io). This repository is the singular source of truth for the Filecoin Protocol. All implementations of the Filecoin Protocol should match and comply with the descriptions, interfaces, code, and models defined in this specification.

Note that the `beta` branch of the specs moves quickly. We work to merge PRs as fast as possible into master, which means changes or reversals are possible here. Accordingly, we periodically compile swaths of spec along with a high-level difflog into the `release` branch. As the spec stabilizes, this practice will change.

## Website

https://beta.spec.filecoin.io is the user-friendly website rendering, which we recommend for reading this repository. The website is updated automatically with every merge to `beta`.

## Install

```sh
Expand All @@ -17,7 +27,33 @@ brew install go
yarn serve
# open http://localhost:1313/ in the browser
```
# Shortcodes

### External modules
External modules should be added as [Hugo Modules](https://gohugo.io/hugo-modules/)
You can find examples in the `config.toml`

```toml
[module]
[[module.imports]]
path = "github.com/filecoin-project/specs-actors"
[[module.imports.mounts]]
source = "actors"
target = "content/modules/actors"
```
This makes files from external repos available for Hugo rendering.

These modules can be updated with

```sh
hugo mod get -u
```
or use specific version with

```sh
hugo mod get github.com/filecoin-project/specs-actors@v0.7.2
```

## Shortcodes
### `Mermaid`
Inline mermaid syntax rendering
```html
Expand Down Expand Up @@ -65,8 +101,26 @@ stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
{{<embed src="/systems/piece_store.id" lang="go">}}
```

## Page Header
The first heading should be # Head with `---` like below and should refer to the overall title of the document. The right nav **only** starts on the second level of headings.

# Frontmatter
```md
---
title: Storage Power Actor
---

# Storage Power Actor
---

## Header for a section in this document
Some text

### Sub header for the a nested section

## Another top level header
```

## Frontmatter
```md
title: Libraries
description: Libraries used from Filecoin
Expand All @@ -78,9 +132,9 @@ dashboardState: wip
dashboardInterface: stable
```

# Code fences
## Code fences

They should **always** have a lang, if you don't know or don't care just use `text`
Code fences should **always** have a lang, if you don't know or don't care just use `text`

```text
Expand All @@ -89,32 +143,14 @@ Random plain text context ...
``
```
# Document header
The first heading should be # Head with `---` like below and should refer to the overall title of the document. The right nav **only** starts on the second level of headings.

```md
---
title: Storage Power Actor
---

# Storage Power Actor
---

## Header for a section in this document
Some text

### Sub header for the a nested section

## Another top level header
```


# References
## Markdown links **(Recommended)**
## References
### Markdown links **(Recommended)**
These links use "portable links" just like `relref` so you can just give it the name of the file and it will fetch the correct relative link and title for the `<a href="/relative/path" title="page title">` automatically.
You can override the `<a>` title by passing a second `string` in the link definition.

**Note**: When using anchors the title can't be fetched automatically.
> **Note**: When using anchors the title can't be fetched automatically.
```md
[Storage Power](storage_power_consensus)
# <a href="/systems/filecoin_blockchain/storage_power_consensus" title="Storage Power Consensus">Storage Power</a>
Expand All @@ -127,13 +163,13 @@ You can override the `<a>` title by passing a second `string` in the link defini

```

## Hugo Cross Refs
### Hugo Cross Refs
Check Hugo's documentation [here](https://gohugo.io/content-management/shortcodes/#ref-and-relref)
```md
[Random]({{<relref "randomness">}})
[Pledge Collateral]({{<relref "storage_power_actor#pledge-collateral">}})
```
## Link shortcode
### Link shortcode
Theres also `link` shortcode which will fetch the title of the page automatically and use it for the `<a>` text and title, but **DOES NOT** work with anchors (`#anchor-id`)
```md
{{<link storage_power_consensus>}}
Expand Down

0 comments on commit 455eafb

Please sign in to comment.