77 - main
88 paths :
99 - ' docs/**'
10- - ' .github/workflows/docs.yml'
10+ - ' .github/workflows/docs-pipeline .yml'
1111 tags :
1212 - ' v*' # Build docs for version tags
1313 pull_request :
1414 paths :
1515 - ' docs/**'
16- - ' .github/workflows/docs.yml'
16+ - ' .github/workflows/docs-pipeline .yml'
1717 workflow_dispatch :
1818 inputs :
1919 version :
5555 VERSION_TAG=${GITHUB_REF#refs/tags/}
5656 git checkout tags/$VERSION_TAG -b docs-$VERSION_TAG
5757
58- - name : Setup Ruby
59- uses : ruby/setup-ruby@v1
60- with :
61- ruby-version : ' 3.2'
62- bundler-cache : true
63- working-directory : ./docs
58+ - name : Set up Docker Buildx
59+ uses : docker/setup-buildx-action@v3
6460
6561 - name : Extract version information
6662 id : version
@@ -107,7 +103,12 @@ jobs:
107103 git_hash: "$(git rev-parse --short HEAD)"
108104 EOF
109105
110- - name : Build with Jekyll
106+ - name : Build Docker image
107+ working-directory : ./docs
108+ run : |
109+ docker build -t opencue-docs:ci .
110+
111+ - name : Build with Jekyll using Docker
111112 working-directory : ./docs
112113 run : |
113114 # Set version in config
@@ -122,24 +123,31 @@ jobs:
122123 echo "opencue_version: ${{ steps.version.outputs.opencue_version }}" >> _config.yml
123124
124125 # Determine baseurl based on deployment target
125- # For docs.opencue.io deployment, use empty baseurl
126- # For GitHub Pages in forks, use /OpenCue
126+ BASEURL=""
127127 if [ "${{ github.repository }}" = "AcademySoftwareFoundation/OpenCue" ]; then
128128 # Main repository - deploying to docs.opencue.io
129- bundle exec jekyll build --baseurl ""
129+ BASEURL= ""
130130 elif [ "${{ github.event_name }}" = "pull_request" ]; then
131131 # Pull request - use GitHub Pages path
132- bundle exec jekyll build --baseurl "/OpenCue"
132+ BASEURL= "/OpenCue"
133133 else
134134 # Fork or other deployment - use GitHub Pages path
135135 if [ "${{ steps.version.outputs.version }}" != "main" ]; then
136- bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}/${{ steps.version.outputs.version }}"
136+ BASEURL= "${{ steps.pages.outputs.base_path }}/${{ steps.version.outputs.version }}"
137137 else
138- bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
138+ BASEURL= "${{ steps.pages.outputs.base_path }}"
139139 fi
140140 fi
141- env :
142- JEKYLL_ENV : production
141+
142+ # Build documentation using Docker
143+ docker run --rm \
144+ -v "$(pwd):/docs" \
145+ -e JEKYLL_ENV=production \
146+ opencue-docs:ci \
147+ bundle exec jekyll build --baseurl "$BASEURL" --verbose
148+
149+ # Fix permissions after Docker build (Docker runs as root, so files are owned by root)
150+ sudo chown -R $USER:$USER _site/
143151
144152 - name : Create version redirect
145153 if : github.event_name != 'pull_request'
0 commit comments