Skip to content

github pages

github pages #11334

Workflow file for this run

name: github pages
on:
push:
branches:
- main
schedule:
# Always regenerate once every 4 hour
- cron: '15 */4 * * *'
pull_request:
workflow_dispatch:
jobs:
build-deploy:
# This ensures that the `GITHUB_TOKEN` set in this GitHub Action job
# has sufficient privileges to write to a secondary branch. On older
# repositories, the `GITHUB_TOKEN` used to have lots of privileges,
# but this needs to now be set explicitly. After setting this, people
# can just fork `mlir-www` and having a working deploy to the
# `gh-pages` branch.
permissions:
contents: write
runs-on: ubuntu-22.04
steps:
- name: Timestamp Begin
run: date
- uses: actions/checkout@v3
- name: Print mlir-www-helper --help
run: ./mlir-www-helper.sh --help
- name: Install dependencies
run: sudo apt-get install doxygen graphviz
- name: Clone LLVM repo
uses: actions/checkout@v3
with:
repository: llvm/llvm-project
ref: 'main'
path: 'llvm_src'
- name: Build MLIR Dialect docs & doxygen src
run: |
mkdir llvm_src/build
cd llvm_src/build
cmake ../llvm \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_TARGETS_TO_BUILD="host" \
-DMLIR_INCLUDE_DOCS="true" \
-DLLVM_ENABLE_DOXYGEN="true"
make -j$(nproc) mlir-doc doxygen-mlir
- name: Install docs
run: ./mlir-www-helper.sh --install-docs "llvm_src" "website"
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.119.0'
extended: false
- name: Build Website
run: |
cd website
hugo --minify -d ../public
echo -n mlir.llvm.org > ../public/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./public
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Timestamp End
run: date