Skip to content

auhrick updated Review Session - Injury Care #761

auhrick updated Review Session - Injury Care

auhrick updated Review Session - Injury Care #761

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
push:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: [ self-hosted, docsqa ]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
token: ${{ github.token }}
lfs: 'true'
clean: 'true'
fetch-depth: 0
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(git branch --remote --verbose --no-abbrev --contains | sed -rne 's/^[^\/]*\/([^\ ]+).*$/\1/p' | sed 's@/@-@')"
id: extract_branch
- name: Pull NPM Dependencies
run: |
npm ci
- name: Generate menu
run: mkdir -p config/_default/; mkdir -p config/_default/; cat content/navigation.md | ./navigation2menu.js > config/_default/menu.en.json
- name: Build WebChart HTML
run: hugo --config 'config-wc.toml' --baseURL "https://docs-qa.med-web.com/${{ steps.extract_branch.outputs.branch }}/wc/" --minify
- name: Build Enterprise Health HTML
run: hugo --config 'config-eh.toml' --baseURL "https://docs-qa.med-web.com/${{ steps.extract_branch.outputs.branch }}/eh/" --minify
- name: Build index.html
run: echo '<h1>Branch ${{ steps.extract_branch.outputs.branch }}</h1>Build triggered by ${{ github.actor }}<br />Base ${{ github.base_ref }}<br />Head ${{ github.head_ref }}<br />Commit <a href="https://github.com/mieweb/docs/commit/${{ github.sha }}">${{ github.sha }}</a><hr /><a href="eh/">EH</a> - <a href="wc/">WC</a>' > public/index.html
- name: 'Deploy built documentation to www folder on docs-qa'
run: rsync -ruva public/ "/www/mie-docs/public/${{ steps.extract_branch.outputs.branch }}/"
- name: Rocket.Chat GitHub Enterprise Notification
uses: wreiske/[email protected]
if: always()
with:
type: ${{ job.status }}
job_name: '*CI* @${{github.actor}}, https://docs-qa.med-web.com/${{ steps.extract_branch.outputs.branch }}/'
channel: '#miedocs'
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
commit: true
token: ${{ github.token }}
- name: comment PR
uses: actions/[email protected]
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 @${{github.actor}}, Your documentation has been pushed to https://docs-qa.med-web.com/${{ steps.extract_branch.outputs.branch }}/ for commit ${{ github.sha }}'
})
if: github.ref != 'refs/heads/master'