doc fix coquille #360
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wails build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set outputs | |
id: vars | |
run: | | |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then | |
echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT | |
else | |
echo "version=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
fi | |
shell: bash | |
# Setup and configure GoLang | |
- name: Setup GoLang | |
uses: actions/setup-go@v4 | |
with: | |
check-latest: true | |
go-version: 1.23.1 | |
- run: go version | |
shell: bash | |
# Setup and configure NodeJS | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: v23.4.0 | |
# install wails | |
- name: Install Wails | |
run: go install github.com/wailsapp/wails/v2/cmd/[email protected] | |
shell: bash | |
- name: Install UPX | |
if: runner.os == 'Windows' | |
uses: crazy-max/ghaction-upx@v3 | |
with: | |
install-only: true | |
- name: Install Linux Wails deps for libwebkit2gtk-4.0 | |
if: matrix.os == 'ubuntu-22.04' | |
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu | |
shell: bash | |
- name: Install Linux Wails deps for libwebkit2gtk-4.1 | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.1-dev gcc-aarch64-linux-gnu | |
shell: bash | |
- name: Build App Linux for libwebkit2gtk-4.0 | |
if: matrix.os == 'ubuntu-22.04' | |
run: wails build --platform 'linux' -o blunderDB-linux-${{ steps.vars.outputs.version }} -upx -clean | |
shell: bash | |
- name: Build App Linux for libwebkit2gtk-4.1 | |
if: matrix.os == 'ubuntu-latest' | |
run: wails build --platform 'linux' -o blunderDB-linux-webkit2gtk-4.1-${{ steps.vars.outputs.version }} -upx -clean -tags webkit2_41 | |
shell: bash | |
- name: Build App Windows | |
if: runner.os == 'Windows' | |
run: wails build --platform 'windows' -o blunderDB-windows-${{ steps.vars.outputs.version }}.exe -upx -clean -tags webkit2_41 | |
shell: bash | |
- name: Build App MacOS | |
if: runner.os == 'macOS' | |
run: wails build --platform 'darwin/universal' -o blunderDB-macos-${{ steps.vars.outputs.version }} -clean -tags webkit2_41 | |
shell: bash | |
- name: Add Linux perms | |
if: runner.os == 'Linux' | |
run: chmod +x build/bin/* | |
shell: bash | |
- name: Add macOS perms | |
if: runner.os == 'macOS' | |
run: | | |
chmod +x build/bin/*/Contents/MacOS/* | |
mv build/bin/blunderDB.app build/bin/blunderDB-macos-${{ steps.vars.outputs.version }}.app | |
shell: bash | |
- name: Build .app zip file | |
if: runner.os == 'macOS' | |
shell: bash | |
run: | | |
ditto -c -k --keepParent ./build/bin/blunderDB-macos-${{ steps.vars.outputs.version }}.app ./build/bin/blunderDB-macos-${{ steps.vars.outputs.version }}.zip | |
# Upload build assets | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Wails Build ${{matrix.os}} blunderDB ${{ steps.vars.outputs.version }} | |
path: | | |
*/bin/ | |
*\bin\* | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
*/bin/* | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Set outputs | |
id: vars | |
run: | | |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then | |
echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT | |
else | |
echo "version=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
fi | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ./doc/requirements.txt | |
sudo apt-get update && sudo apt-get install latexmk texlive-xetex texlive-fonts-recommended texlive-latex-extra | |
shell: bash | |
- name: Build documentation | |
run: | | |
cd ./doc | |
python build.py | |
- name: Rename PDF files | |
run: | | |
find ./doc/build/pdf_en/ -name '*.pdf' -exec mv {} ./doc/build/pdf_en/blunderDB-${{ steps.vars.outputs.version }}-en.pdf \; | |
find ./doc/build/pdf_fr/ -name '*.pdf' -exec mv {} ./doc/build/pdf_fr/blunderDB-${{ steps.vars.outputs.version }}-fr.pdf \; | |
shell: bash | |
- name: Create index.html for redirection | |
run: | | |
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=en/"></head><body></body></html>' > ./doc/build/index.html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./doc/build | |
publish_branch: gh-pages | |
keep_files: false # This will clean the branch before deploying | |
# Upload build assets | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: blunderDB pdf docs | |
path: | | |
*/build/pdf_en/*.pdf | |
*/build/pdf_fr/*.pdf | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
*/build/pdf_en/*.pdf | |
*/build/pdf_fr/*.pdf |