Skip to content

pages build and deployment #25

pages build and deployment

pages build and deployment #25

Workflow file for this run

name: pages-build-deployment
run-name: pages build and deployment
on:
push:
branches:
- docs-custom-action
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: docs-custom-action
submodules: 'recursive'
- name: Build Docker image
run: |
docker build -t my_image ./.devcontainer
- name: Run Docker container
run: |
docker run -t -d --name my_container my_image
- name: Build
run: |
#########################
##### Build Dragon ######
#########################
# export DRAGON_VERSION=$(grep DRAGON_VERSION src/modulefiles/dragon-dev | awk '{print $3}')
# export DRAGON_BASE_DIR=$PWD/src
# echo "DRAGON_BASE_DIR=$DRAGON_BASE_DIR"
# export DRAGON_INCLUDE_DIR=$DRAGON_BASE_DIR/include
# export DRAGON_LIB_DIR=$DRAGON_BASE_DIR/lib
# export DRAGON_BUILD_NTHREADS=6
# export PYTHONPATH=$DRAGON_BASE_DIR
# echo "Building and activating new, clean environment."
# python3 -m venv --clear _env
# . _env/bin/activate
# python3 -m pip install -U pip
# python3 -m pip install -r src/requirements.txt -c src/constraints.txt
# export PATH=$PWD/hack:$PATH
# echo "Building source code."
# cd external
# make clean
# make build-capnproto
# cd ..
# cd src
# make
# python3 setup.py develop
# cd ..
set -x
docker exec -i my_container bash -c "source /etc/profile.d/modules.sh"
docker exec -i my_container ls
docker exec -i my_container mkdir dragon
docker cp ./ my_container:/dragon
docker exec my_container ls
docker exec -i my_container bash -c "cd dragon && source /etc/profile.d/modules.sh && source hack/clean_build && cd doc && make"
docker exec -i my_container bash -c "cd dragon && ls doc && ls src"
docker cp my_container:/dragon/doc .
ls ./doc
# - name: Build with Doxygen
# uses: mattnotmitt/[email protected]
# with:
# working-directory: './src'
# doxyfile-path: 'Doxyfile'
# # enable-latex: true
# - name: Build Doc
# run: |
# cd doc
# make html
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
# - name: Build with Jekyll
# uses: actions/jekyll-build-pages@v1
# with:
# source: ./doc
# destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: |
.
!./external
# Deployment job
deploy:
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4