Skip to content

github pages

github pages #1378

Workflow file for this run

---
name: github pages
on:
push:
branches:
- main
schedule:
# Always regenerate once at the end of day
- cron: '0 0 * * *'
jobs:
# Build CIRCT and run its tests.
build-deploy:
name: Build CIRCT website
runs-on: ubuntu-latest
# Request permissions to push to gh-pages branch.
permissions:
contents: write
steps:
- uses: actions/checkout@v1
- name: Install Doxygen
run: sudo apt-get install doxygen graphviz ninja-build
# Clone the CIRCT repo and its submodules. Do shallow clone to save clone
# time.
- name: Get CIRCT
uses: actions/checkout@v2
with:
repository: llvm/circt
fetch-depth: 2
submodules: "true"
path: 'circt_src'
# Build the CIRCT circt-doc and doxygen-circt target to build docs.
- name: Build CIRCT Dialect docs & doxygen src
run: |
mkdir circt_src/build &&
cd circt_src/build &&
cmake -GNinja ../llvm/llvm \
-DCIRCT_INCLUDE_DOCS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS=circt \
-DLLVM_EXTERNAL_CIRCT_SOURCE_DIR=.. \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_USE_LINKER=lld
ninja circt-doc doxygen-circt -j$(nproc)
- name: Install doxygen docs
run: cp -r circt_src/build/tools/circt/docs/doxygen/html website/static/doxygen
- name: Install CIRCT Dialect docs
run: ./copy_docs.sh circt_src/build/tools/circt/docs/ website/content/docs/
- name: Install CIRCT Source docs
run: ./copy_docs.sh circt_src/docs/ website/content/docs/ &&
./process_included_docs.sh website/content/docs/ &&
echo "Hack around file/directory name conflict" && rm -Rf website/content/docs/Interfaces &&
mkdir -p website/content/includes/ &&
cp -rv circt_src/docs/includes/img website/content/includes/
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.101.0'
# extended: true
- name: Build Website
run: (cd website && hugo --minify -d ../public &&
echo -n circt.llvm.org > ../public/CNAME )
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
publish_dir: ./public
force_orphan: true
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Timestamp End
run: date