Skip to content

Commit

Permalink
Docs: github actions to render .md markdown files
Browse files Browse the repository at this point in the history
  • Loading branch information
sdarwin authored and cmazakas committed Sep 18, 2024
1 parent 3a36b97 commit ef05a59
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Convert markdown docs to html

on:
push:
branches: ["master", "develop"]
paths:
- proposal/**
- .github/workflows/build-docs.yml

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
container:
image: cppalliance/wg21:latest
options: --user 1001

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build docs
run: |
set -xe
# list_of_files="draft P3390R0"
list_of_files="draft"
cd proposal
git clone https://github.com/mpark/wg21.git
echo "include wg21/Makefile" > Makefile
for file in $list_of_files; do
make ${file}.html
done
cp generated/* ../docs/
cd ..
git config --global user.name 'commitbot'
git config --global user.email 'commitbot@boost.org'
git add docs/* || true
git commit -m "Docs: update from proposal/ md files" || true
git push
- name: Trigger Publish Workflow
uses: actions/github-script@v7
with:
script: |
github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: context.repo.repo,
event_type: 'publish-trigger',
});
3 changes: 3 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

repository_dispatch:
types: [publish-trigger]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
Expand Down

0 comments on commit ef05a59

Please sign in to comment.