Build and deploy github page #92
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: Build and deploy github page | |
on: | |
schedule: | |
# Every weeks | |
- cron: '30 19 * * SUN' | |
workflow_dispatch: | |
inputs: | |
publish: | |
description: 'Push to github page branch or not' | |
required: true | |
default: false | |
type: boolean | |
jobs: | |
build_and_deploy: | |
name: 'Deploy doxygen page' | |
runs-on: 'ubuntu-latest' | |
if: github.repository_owner == 'Samsung' | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
- name: 'Generate HTML' | |
uses: mattnotmitt/[email protected] | |
with: | |
doxyfile-path: 'infra/doxygen/Doxyfile' | |
- name: 'Tar artifact' | |
run: tar -zcf doxygen.tar.gz -C doxygen/html ./ | |
- name: 'Generate artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: doxygen-html | |
path: doxygen.tar.gz | |
- name: 'Deploy' | |
if: ${{ github.event_name == 'schedule' || github.event.inputs.publish == 'true' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: doxygen/html | |
branch: gh-pages |