nightly-build #485
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: nightly-build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '43 5 * * *' | |
jobs: | |
build-documentation: | |
if: github.repository == 'gnucash/gnucash-docs' | |
runs-on: ubuntu-latest | |
name: make HTML in Ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- run: sudo apt-get update | |
- name: Install minimal dependencies | |
run: sudo apt-get install -y cmake ninja-build libxml2-utils xsltproc docbook-xsl | |
- run: | | |
echo "ROOT_DIR=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV | |
- name: Create Directories | |
run: | | |
pwd | |
mkdir $ROOT_DIR/inst | |
mkdir build | |
- name: Configure GnuCash-docs | |
run: | | |
cd build | |
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$ROOT_DIR/inst $GITHUB_WORKSPACE -DWITH_MOBI=ON | |
- name: Build HTML | |
run: | | |
cd build | |
ninja html | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: TestLog | |
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log | |
- name: Prepare upload | |
if: success() | |
run: | | |
mkdir build/github-pages | |
mv build/share/doc/* build/github-pages/ | |
chmod -v -R +rX "build/github-pages" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload pages | |
uses: actions/upload-pages-artifact@v3 | |
if: success() | |
with: | |
path: ${{ github.workspace }}/build/github-pages | |
deploy-documentation: | |
needs: build-documentation | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Publish | |
id: deployment | |
uses: actions/deploy-pages@v4 |