Skip to content

Commit

Permalink
New documentation site
Browse files Browse the repository at this point in the history
  • Loading branch information
Alasdair Allan committed Aug 9, 2021
1 parent 0e86773 commit 75e6050
Show file tree
Hide file tree
Showing 430 changed files with 15,235 additions and 10,587 deletions.
50 changes: 50 additions & 0 deletions .github/actions/deploy-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy via Bastion Host
description: "Deploy specified files and directories to a server via a bastion host"
inputs:
private_ssh_key:
description: "The private SSH key used to authenticate with the remote servers"
required: true

public_bastion_host_keys:
description: "The public SSH host keys for the bastion server"
required: true

bastion_host:
description: "The [user@]hostname of the bastion server"
required: true

host:
description: "The [user@]hostname of the web server"
required: true

source:
description: "The files and directories to copy from the workspace"
required: true

destination:
description: "The destination to copy the source files and directories to"
required: true

runs:
using: "composite"
steps:
- name: Configure ssh-agent for subsequent steps
run: echo "SSH_AUTH_SOCK=/tmp/ssh_agent.sock" >> $GITHUB_ENV
shell: bash

- name: Start ssh-agent with SSH key
run: |
ssh-agent -a $SSH_AUTH_SOCK
ssh-add - <<< "${{ inputs.private_ssh_key }}"
shell: bash

- name: Populate known hosts
run: |
mkdir -m 700 -p ~/.ssh
printf "${{ inputs.public_bastion_host_keys }}" >> ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
shell: bash

- name: rsync source to destination
run: rsync -avz --delete -e 'ssh -A ${{ inputs.bastion_host }} ssh' ${{ inputs.source }} ${{ inputs.host }}:${{ inputs.destination }}
shell: bash
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "weekly"
target-branch: "develop"
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- uses: seanmiddleditch/gha-setup-ninja@v3
with:
version: 1.10.2
- name: Build documentation
run: make -j 2
- name: Deploy to Mythic Beasts
if: ${{ github.ref == 'refs/heads/master' }}
uses: ./.github/actions/deploy-action
with:
private_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
public_bastion_host_keys: ${{ secrets.DEPLOY_KNOWN_HOSTS }}
bastion_host: ${{ secrets.DEPLOY_BASTION_HOST }}
host: ${{ secrets.DEPLOY_HOST }}
# this needs to match destination: in _config.yml
source: documentation/html/
destination: documentation
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_build/
Gemfile.lock
.DS_Store
__pycache__
build
documentation/html
.sass-cache
39 changes: 21 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
# Contributing
# Contributing to Raspberry Pi Documentation

Please read our contribution guidelines before creating an issue or pull request.
Although you won't be able to directly change documentation on the official repository, you can take a look at all the source files and see how everything is arranged. The sources files and folders follow the hierarchical documentation as found on the Raspberry Pi website.

**Please note that the issue tracker on this repository is for issues with *the contents of the documentation*, not support queries. Please post support queries in the [forums](https://www.raspberrypi.org/forums/).**
In order to submit new or corrected documentation, you have to create a GitHub account (if you don't already have one) and **fork** the original repository to your account. You make changes as you see fit, save them in your repository, then make something called a **pull request** to the original Raspberry Pi repository. This pull request (**PR**) then appears in the Raspberry Pi repository where it can be assessed by the maintainers, copy edited, and, if appropriate, merged with the official repository.

When creating an issue, please:
The documentation which appears on the Raspberry Pi website is generated from the GitHub repository, and is updated approximately hourly.

- Explain the issue as clearly as possible
- Include a link to the page(s) to which your issue relates
- Use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format your issue, particularly for blocks of code
You will need a GitHub account to perform any of the following operations.

Creating a pull request:
## Forking a repository

- If your contribution regards typos and spelling mistakes, feel free to fix these, and they'll be merged if they accord with our [in-house style guide](https://github.com/raspberrypilearning/style-guide/blob/master/style-guide.md). Otherwise, always open an issue first. This will allow us to determine whether or not the change should take place. Explain your issue, and we will discuss it with you. If we agree the change is necessary, we will mark it as 'TODO'. Then we will either fix it when we get a chance, or allow a member of the community to supply the change with a pull request.
- Note that this documentation is intended to be a short and concise set of helpful resources aimed at the majority of users. We will only feature our recommended distribution, Raspberry Pi OS, in detail; in order to keep the documentation manageable, we will not accept additions covering alternative distributions.
This is easy. Go to the Raspberry Pi repository, https://github.com/raspberrypi/documentation, and look at the top right of the page. There should be a button labelled **Fork**, which will fork a copy of the repository to your own GitHub account.

Find a short tutorial on making changes using GitHub [here](using-github.md).
## Make Changes

**Please be aware we are not able to deal with all issues and pull requests immediately, so please have patience.**
In your own copy of the repo, you can now alter or add files.

## Derivatives
To edit a file, first find the file in the filename tree, and click on it. This displays the page in fully rendered markup, and on the toolbar at the top of the document (not top of the page) is a small icon of a pencil. This is the edit button. Click on it and the file will appear in the Github editor. You can now edit away to your heart's content. You can click on **Preview changes** to see the fully rendered file with your edits.

The licence must remain in all derivatives of this work.
At the end of the page is a box called **Commit Changes**. You can either commit your changes directly to your own master branch or create a new branch for use as a pull request. Use the master option, as this means you are making changes to your master copy. Using the branch option will create a new branch in your own repository, but that's a little more complicated to deal with so it won't be described here. If you are making a lot of independent changes over time before pushing the changes to Raspberry Pi, you may wish to investigate the branch option. Update the commit title and enter a description of the change at this point.

## Licence
Selecting **Commit changes** will make the change to your master branch. You now need to take that change and make a pull request from it.

[![Creative Commons Licence](https://licensebuttons.net/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/)
## Opening a Pull Request

***Raspberry Pi Documentation*** by the [Raspberry Pi Foundation](https://www.raspberrypi.org/) is licensed under a [Creative Commons Attribution 4.0 International Licence](http://creativecommons.org/licenses/by-sa/4.0/).
This is pretty easy. Click on the **Pull Requests** tab on the toolbar. Afterwards, there should be a green button just below the toolbar that is labelled **New pull request**. Click it, and a page should appear that asks you to compare changes. This PR page is actually on the Raspberry Pi GitHub page, not the contributor's, because a PR requests the Raspberry Pi repository maintainers to 'pull' from the contributor's repository. The left-hand side should be the `raspberrypi/documentation` repository, and the branch should be the master one. The right-hand side is where the PR is coming from: your GitHub account, and your master branch. Further down the page you should see a list of the commits you want to have in the PR, and, below that, the actual changes.

If you are happy for the PR to be created, click on **Create pull request**.

And that's it! The Raspberry Pi documentation PR list will now have your entry in it. It will be read, assessed for technical correctness, passed to copy editors for final checking, and finally merged to the main documentation tree.


This is a very quick guide to contributing via GitHub, but it will get you started and enable you to make a difference!

Based on a work at https://github.com/raspberrypi/documentation
35 changes: 35 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.2.0"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem 'jekyll-asciidoc'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
gem "tzinfo", "~> 2.0"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?

90 changes: 90 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
asciidoctor (2.0.15)
colorator (1.1.0)
concurrent-ruby (1.1.9)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.15.3)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jekyll (4.2.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
jekyll-asciidoc (3.0.0)
asciidoctor (>= 1.5.0)
jekyll (>= 3.0.0)
jekyll-feed (0.15.1)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.7.1)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.5.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.26.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2021.1)
tzinfo (>= 1.0.0)
unicode-display_width (1.7.0)
wdm (0.1.1)

PLATFORMS
ruby

DEPENDENCIES
jekyll (~> 4.2.0)
jekyll-asciidoc
jekyll-feed (~> 0.6)
minima (~> 2.0)
tzinfo (~> 2.0)
tzinfo-data
wdm (~> 0.1.0)

BUNDLED WITH
2.2.15
9 changes: 0 additions & 9 deletions LICENCE.md

This file was deleted.

Loading

0 comments on commit 75e6050

Please sign in to comment.