Skip to content

Commit

Permalink
Build in .render and publish to external site (#155)
Browse files Browse the repository at this point in the history
* Building docs in dev branch not gh-pages
* Use .render/ and .lint/ for CI
* Make _site and upload to external server
* Debugging missing upload target
* tags -> releases
* Intro text now in README.md, between INTRO-START and INTRO-END markers
  • Loading branch information
peterbrightwell authored Jan 26, 2021
1 parent 11b9328 commit 41e0f2a
Show file tree
Hide file tree
Showing 21 changed files with 339 additions and 86 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Setup
run: make distclean build-tools
run: make -C .lint distclean build-tools
- name: Lint
run: make lint
run: make -C .lint lint
42 changes: 17 additions & 25 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: gh-pages
- name: Use Node.js
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Uses Python
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Setup
run: make distclean build-tools
- name: Build
run: make build
- name: Remove source-repo
run: rm -rf source-repo/
- name: Add and Commit
uses: EndBug/add-and-commit@v5
- name: Install Ruby
uses: actions/setup-ruby@v1
with:
author_name: AMWA
author_email: [email protected]
message: "Build for Github Pages"
add: '.'
branch: gh-pages
ruby-version: '2.x'
- name: Install Bundler
run: gem install bundler
- name: Setup
run: make -C .render distclean build-tools
- name: Build site
run: make -C .render build
- name: Upload site
run: make -C .render upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages


SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ node_modules/
package.json
yarn.lock
.scripts/
.ssh/
Gemfile.lock
raml2html-nmos-theme/
_site/
assets/
branches/
index.md
source-repo/
tags/
6 changes: 0 additions & 6 deletions .init-scripts/make-build-tools.sh

This file was deleted.

6 changes: 6 additions & 0 deletions .lint/.init-scripts/make-build-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -o errexit

git clone --single-branch --branch use-lint-dir https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}github.com/AMWA-TV/nmos-lint-scripts .scripts
.scripts/install-dependencies.sh
File renamed without changes.
4 changes: 2 additions & 2 deletions Makefile → .lint/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.PHONY: build-tools distclean

build-tools:
./.init-scripts/make-build-tools.sh
.init-scripts/make-build-tools.sh

distclean:
./.init-scripts/make-distclean.sh
.init-scripts/make-distclean.sh
6 changes: 6 additions & 0 deletions .render/.init-scripts/make-build-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -o errexit

git clone --single-branch --branch main https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}github.com/AMWA-TV/nmos-doc-build-scripts .scripts
.scripts/install-dependencies.sh
9 changes: 9 additions & 0 deletions .render/.init-scripts/make-distclean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -o errexit

rm -f index.md index-contents.md
rm -rf source-repo/ branches/ releases/
rm -rf .scripts/ .layouts/ _layouts/ assets/ raml2html-nmos-theme/ _site/ .ssh/
rm -rf node_modules/
rm -f yarn.lock package.json package-lock.json Gemfile.lock
3 changes: 3 additions & 0 deletions .render/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem 'faraday', '~>0'
9 changes: 9 additions & 0 deletions .render/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-include .scripts/scripts.mk

.PHONY: build-tools distclean

build-tools:
.init-scripts/make-build-tools.sh

distclean:
.init-scripts/make-distclean.sh
16 changes: 16 additions & 0 deletions .render/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Don't change these
theme: jekyll-theme-primer
spec_server: specs.amwa.tv

# AMWA ID
amwa_id: IS-04

# Base name for site (typically lower case version of AMWA ID, or the repo name)
baseurl: /is-04

# Which release or branch appears in header links and on the home page
default_tree: releases/v1.3 # alternatively e.g. branches/v1.2.x

# Regex patterns of releases and branches to show
show_releases: ^v[0-9]+\.[0-9]+$|^v[0-9]+\.[0-9]+\.[0-9]+$
show_branches: ^v[0-9]+\.[0-9]+-dev$|^v[0-9]+\.[0-9]+\.x$|^publish-
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing

Thanks for your interest in this AMWA NMOS Specification.

AMWA Specifications (including Best Current Practices) are developed and ratified in accordance with
AMWA's Specification Process. See BCP-001 on the [AMWA Specifications page](https://www.amwa.tv/specifications)

They are created and updated in AMWA working groups, requiring AMWA membership for participation.

AMWA member contributions to this Specification are made subject to AMWA's [IPR Policy](https://www.amwa.tv/about/policies/AMWA_IPR_Policy_V3.0.pdf).
Contributions should be accompanied by the form in an appendix of that policy.

For more information for those wishing to develop or contribute to AMWA NMOS Specifications,
please see the NMOS [Wiki Page](https://github.com/amwa-tv/nmos/wiki/Maintainers) for maintainers.

## Reporting Issues

AMWA members and non-members are welcome to raise issues via the GitHub Issues tab.

## Pull Requests

We accept Pull Requests from AMWA members participating in relevant workgroups. These are subject to the IPR Policy.

Please read about our [GitHub Workflow](https://github.com/amwa-tv/nmos/wiki/GitHub-Workflow) before creating a pull request,
in particular the 'Maintaining a Specification' section, as we try to maintain a consistent approach to branches and releases.
This should indicate which branch it is most appropriate to create your pull request against.

Each NMOS workgroup has a number of members that will review a PR.

## Suggesting Improvements or Enhancements

We are interested in hearing of suggestions, both for the spec itself and the accompanying documentation.
Please use the issue tracker or [contact AMWA](https://www.amwa.tv/contact).
Loading

0 comments on commit 41e0f2a

Please sign in to comment.