Skip to content

Merge pull request #433 from OP-TED/feature/TED-1417 #51

Merge pull request #433 from OP-TED/feature/TED-1417

Merge pull request #433 from OP-TED/feature/TED-1417 #51

Workflow file for this run

name: TED-SWS documentation
on:
push:
branches:
- main
- 'feature/**'
paths:
- 'docs/**'
pull_request:
types:
- closed
branches:
- master
paths:
- 'docs/**'
env:
SITE_DIR: 'site'
jobs:
build_site:
name: "Build site with Antora"
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Generate site using antora site action"
uses: kameshsampath/antora-site-action@master
with:
antora_playbook: ./docs/antora-playbook.yml
- name: "Upload generated site"
uses: actions/upload-artifact@v1.0.0
with:
name: site
path: "${{ github.workspace }}/docs/build/${{ env.SITE_DIR }}"
deploy_site:
runs-on: [ubuntu-latest]
needs: [build_site]
name: "Deploy GitHub Pages"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
steps:
- name: Setup Node.js for use with actions
uses: actions/setup-node@v1.1.0
with:
version: 12.x
- name: Checkout
uses: actions/checkout@v2
- name: Download generated site
uses: actions/download-artifact@v1
with:
name: site
path: "${{ github.workspace }}/${{ env.SITE_DIR }}"
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
# ACCESS_TOKEN: # optional
GITHUB_TOKEN: "${{ github.token}}"
FOLDER: "${{ env.SITE_DIR }}"
BRANCH: 'gh-pages'
COMMIT_MESSAGE: "[CI] Publish Documentation for ${{ github.sha }}"