-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from richardmarston/master
Add github actions for documentation
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: git-checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: build-documentation | ||
uses: ./ | ||
|
||
- name: Create doc redirect | ||
uses: "finnp/create-file-action@master" | ||
env: | ||
FILE_NAME: ${{ github.workspace }}/built_documentation/.nojekyll | ||
FILE_DATA: "" | ||
|
||
- name: Push | ||
uses: s0/git-publish-subdir-action@develop | ||
env: | ||
REPO: self | ||
BRANCH: gh-pages | ||
FOLDER: ${{ github.workspace }}/built_documentation | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to get a token | ||
MESSAGE: "Build documentation: ({sha}) {msg}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# action.yml | ||
name: 'Build Documentation' | ||
description: 'We are going to build the documentation!' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
entrypoint: './entrypoint.sh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
if [ -n "${GITHUB_WORKSPACE}" ]; | ||
then | ||
cd documentation | ||
./docu.sh --release | ||
cp -a ${GITHUB_WORKSPACE}/documentation/_build/html ${GITHUB_WORKSPACE}/built_documentation | ||
fi |