Skip to content

Commit

Permalink
refactor: docs: Docs Overhaul (#1438)
Browse files Browse the repository at this point in the history
* Beginning new docs

* Theming set up

* General layouts n links sorted

* Cleaned up

* Updated Commandline

* Cleaned a bit

* Minor cleaning

* Removed todo

* Config page

* Connect to Polkadotjs

* Fixed dev resources

* New categories sorted

* Updated permalink

* Corrected contributor doc

* Removed unused partials

* Tidying

* Removed offical nodes page

* Amended with feed back

* Resolved a majority of feedback

* Ammeded workflows

* Feedback

* Added diagram

* Recent feedback

* Test package content

* Removed comment

* Debugging page

* Block production expansion

* Typos

* Host spec link

Co-authored-by: noot <36753753+noot@users.noreply.github.com>
  • Loading branch information
RyRy79261 and noot committed Apr 6, 2021
1 parent f5de11e commit 976f53a
Show file tree
Hide file tree
Showing 57 changed files with 1,173 additions and 1,106 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $ git remote -v (you should see myrepo and gossamer in the list of remotes)

To start, check out our open issues. We recommend starting with an [issue labeled `Good First Issue`](https://github.com/ChainSafe/gossamer/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22). Leave a comment to let us know that you would like to work on it.

Another option is to improve gossamer where you see fit based on your evaluation of our code. In order to best faciliate collabration, please create an issue before you start working on it.
Another option is to improve gossamer where you see fit based on your evaluation of our code. In order to best faciliate collaboration, please create an issue before you start working on it.

**6. Make improvements to the code.**

Expand Down
61 changes: 13 additions & 48 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,21 @@
name: docs

name: Publish docs via GitHub Pages
on:
push:
branches:
- development

env:
RUBY_VERSION: 2.7
BUNDLE_GEMFILE: docs/Gemfile

jobs:
deploy_docs:
runs-on: 'ubuntu-latest'
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
- name: Setup cache for Bundler
id: cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Set up dependencies
run: |
bundle install --path=vendor/bundle --jobs 4 --retry 3
bundle clean
- name: Clone target branch
run: |
REMOTE_BRANCH="${REMOTE_BRANCH:-gh-pages}"
REMOTE_REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
echo "Publishing to ${GITHUB_REPOSITORY} on branch ${REMOTE_BRANCH}"
rm -rf docs/_site/
git clone --depth=1 --branch="${REMOTE_BRANCH}" --single-branch --no-checkout \
"${REMOTE_REPO}" docs/_site/
- name: Build site
run: bundle exec jekyll build --source docs --destination docs/_site --verbose --trace
- name: Checkout main
uses: actions/checkout@v2

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
# For jekyll-github-metadata
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to GitHub Pages
run: |
SOURCE_COMMIT="$(git log -1 --pretty="%an: %B" "$GITHUB_SHA")"
pushd docs/_site &>/dev/null
: > .nojekyll
git add --all
git -c user.name="${GITHUB_ACTOR}" -c user.email="${GITHUB_ACTOR}@users.noreply.github.com" \
commit --quiet \
--message "Deploy docs from ${GITHUB_SHA}" \
--message "$SOURCE_COMMIT"
git push
popd &>/dev/null
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_DOMAIN: gossamer.chainsafe.io
CONFIG_FILE: docs/mkdocs.yml
EXTRA_PACKAGES: build-base
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,11 @@ gossamer: clean

## install: install the gossamer binary in $GOPATH/bin
install:
GOBIN=$(GOPATH)/bin go run scripts/ci.go install
GOBIN=$(GOPATH)/bin go run scripts/ci.go install

build-mkdocs:
docker run --rm -it -v ${PWD}:/docs/docs squidfunk/mkdocs-material build

mkdocs:
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs/docs squidfunk/mkdocs-material

2 changes: 1 addition & 1 deletion cmd/gossamer/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ var (
// ImportRawFlag imports a raw private key
ImportRawFlag = cli.StringFlag{
Name: "import-raw",
Usage: "Import encrypted keystore file generated with gossamer",
Usage: "Import a raw private key",
}
// ListFlag List node keys
ListFlag = cli.BoolFlag{
Expand Down
19 changes: 0 additions & 19 deletions docs/Gemfile

This file was deleted.

259 changes: 0 additions & 259 deletions docs/Gemfile.lock

This file was deleted.

Loading

0 comments on commit 976f53a

Please sign in to comment.