mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-12-02 00:12:28 +08:00
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
name: Linux Emscripten
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Linux Emscripten
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCUMENTATION: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: seanmiddleditch/gha-setup-ninja@master
|
|
- uses: mymindstorm/setup-emsdk@v7
|
|
|
|
- name: Install Doxygen/Graphviz
|
|
if: fromJSON(env.DOCUMENTATION)
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install doxygen graphviz
|
|
|
|
- name: Build
|
|
run: |
|
|
emcmake cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -S . -B build
|
|
cmake --build build
|
|
|
|
- name: Build documentation
|
|
if: fromJSON(env.DOCUMENTATION)
|
|
run: |
|
|
cd build
|
|
cmake --build . --target doc
|
|
# Copy emscripten built examples to the doxygen output directory for deployment
|
|
rsync -amv --include='*/' --include='*.html' --include='*.js' --include='*.wasm' --exclude='*' examples doc/doxygen/html
|
|
|
|
# Deploy the HTML documentation to GitHub Pages
|
|
- name: GH Pages Deployment
|
|
if: fromJSON(env.DOCUMENTATION)
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: build/doc/doxygen/html/
|
|
enable_jekyll: false
|
|
allow_empty_commit: false
|
|
force_orphan: true
|
|
publish_branch: gh-pages
|