Skip to content

Commit

Permalink
Add workflow to publish documentation
Browse files Browse the repository at this point in the history
Closes #35
  • Loading branch information
baynezy committed Feb 9, 2024
1 parent 8cfa77b commit 938b3cd
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Push Documentation

on:
push:
branches:
- master
workflow_dispatch:


jobs:
push-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Install Doxygen Portable
run: |
sudo apt-get update
sudo apt-get install doxygen
sudo apt-get install graphviz
doxygen --version
- name: Generate documentation
run: |
doxygen doxygen.config
- name: Set config settings
run: |
git config --global user.email "noreply@action.bot"
git config --global user.name "GitHub Action Bot"
git config --global push.default matching
- name: Clone gh-pages branch
run: |
mkdir gh-pages
git clone --quiet --branch=gh-pages https://${{ secrets.USERNAME }}:${{ secrets.PAT }}@github.com/baynezy/SiteWarmer.git ./gh-pages
cd gh-pages
git status
- name: Clean gh-pages folder
run: |
cd gh-pages
find . -type f -not -name '.git*' -delete
git status
- name: Copy contents of documentation folder into gh-pages folder
run: |
cp -r ../documentation/html/* .
git status
- name: Commit and push changes
run: |
git add --all
git status
git diff-index --quiet HEAD || git commit -m "skip ci - static site regeneration"
git status
git push --quiet

0 comments on commit 938b3cd

Please sign in to comment.