Skip to content

Commit

Permalink
Merge pull request #6 from richardmarston/master
Browse files Browse the repository at this point in the history
Add github actions for documentation
  • Loading branch information
m-mirz authored Jul 27, 2021
2 parents ad589ea + 5e4cfc2 commit 4d706c1
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/workflow.yaml
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}"
7 changes: 7 additions & 0 deletions action.yaml
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'
8 changes: 8 additions & 0 deletions entrypoint.sh
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

0 comments on commit 4d706c1

Please sign in to comment.