Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/deploy-tap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
permissions:
contents: write
pull-requests: write
environment:
name: homebrew
url: https://github.com/MFlowCode/homebrew-mfc
steps:
- name: Checkout MFC repository
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ jobs:
manifests:
runs-on: ubuntu-latest
needs: Container
environment:
name: containers
url: https://hub.docker.com/r/mflowcode/mfc
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,85 +9,102 @@
pull_request:

jobs:
docs:
name: Build & Publish
build:
name: Build & Verify
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for per-page last-updated dates

# We build doxygen from source because of
# https://github.com/doxygen/doxygen/issues/9016
- name: Build Doxygen
run: |
sudo apt update -y
sudo apt install -y cmake ninja-build graphviz texlive-binaries
git clone https://github.com/doxygen/doxygen.git ../doxygen
cd ../doxygen
git checkout Release_1_16_1
cd -
cmake -S ../doxygen -B ../doxygen/build -G Ninja
sudo ninja -C ../doxygen/build install

- name: Build Documentation
run: |
pip3 install fypp rich PyYAML
cmake -S . -B build -G Ninja --install-prefix="$(pwd)/build/install" -D MFC_DOCUMENTATION=ON
ninja -C build install

- name: Verify essential site files
run: |
for f in index.html 404.html robots.txt; do
test -f "build/install/docs/mfc/$f" || { echo "Missing $f"; exit 1; }
done

- name: Upload Built Documentation Artifact
uses: actions/upload-artifact@v4
with:
name: mfc-docs
path: build/install/docs/mfc
if-no-files-found: error
retention-days: 7

# From here https://github.com/cicirello/generate-sitemap
- name: Generate the sitemap
id: sitemap
uses: cicirello/generate-sitemap@v1
with:
base-url-path: https://mflowcode.github.io/
path-to-root: build/install/docs/mfc
include-pdf: false
sitemap-format: xml

- name: Output stats
run: |
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"

- name: Linkcheck - Lychee
uses: lycheeverse/lychee-action@v2
with:
args: -c .lychee.toml build/install/docs/mfc/
fail: true

publish:
Comment thread
sbryngelson marked this conversation as resolved.
Dismissed
name: Publish
runs-on: ubuntu-latest
needs: build
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
environment:
name: docs
url: https://mflowcode.github.io/

steps:
- uses: actions/checkout@v4

- name: Download Built Documentation Artifact
uses: actions/download-artifact@v4
with:
name: mfc-docs
path: build/install/docs/mfc

- name: Publish Documentation
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' )
run: |
set +e
git ls-remote "${{ secrets.DOC_PUSH_URL }}" -q
if [ "$?" -ne "0" ]; then exit 0; fi
set -e
git config --global user.name 'MFC Action'
git config --global user.email '<>'
git clone "${{ secrets.DOC_PUSH_URL }}" ../www
rm -rf ../www/*
mv build/install/docs/mfc/* ../www/
git -C ../www add -A
git -C ../www commit -m "Docs @ ${GITHUB_SHA::7}" || true
git -C ../www push

# DOC_PUSH_URL should be of the format:
# --> https://<username>:<token>@github.com/<username>/<repository>

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
3 changes: 3 additions & 0 deletions .github/workflows/homebrew-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
update-homebrew-tap:
name: Update homebrew-mfc tap
runs-on: ubuntu-latest
environment:
name: homebrew
url: https://github.com/MFlowCode/homebrew-mfc

steps:
- name: Determine version
Expand Down
Loading