-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INFRA] Proposal for building stable docs in remote runner for releas…
…es (#4160) * Add workflow for stable docs * Add to readme * Add configs for testing * Use specific version tag * Update from comments * Remove test recipe * Update readme * Update comments * Add ssh configs * Update maintenance docs * Update maintenance docs * Syntax * Add note * Formatting
- Loading branch information
Showing
4 changed files
with
113 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
name: Build release docs | ||
|
||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# This will run automatically after tagging the release commit on main | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release-docs: | ||
if: github.repository == 'nilearn/nilearn' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 360 | ||
env: | ||
BROWSER: /usr/bin/firefox | ||
DISPLAY: :99.0 | ||
NILEARN_DATA: /home/runner/work/nilearn/nilearn/nilearn_data | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
steps: | ||
- name: Checkout nilearn | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Add SSH key | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
run: | | ||
mkdir -p ~/.ssh | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
echo "${{ secrets.ACTIONS_SSH_DEPLOY }}" > ~/.ssh/github_actions | ||
chmod 600 ~/.ssh/github_actions | ||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | ||
ssh-add ~/.ssh/github_actions | ||
- name: Install apt packages | ||
run: | | ||
sudo -E apt-get -yq update | ||
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install \ | ||
dvipng texlive-latex-base texlive-latex-extra | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install packages | ||
run: | | ||
python -m pip install --user --upgrade pip setuptools | ||
python -m pip install .[plotting,doc] | ||
# Update the authors file and the names file | ||
# in case a contributor has been added to citation.cff | ||
# but did not run the maint_tools/citation_cff_maint.py script. | ||
- name: update AUTHORS.rst and doc/changes/names.rst | ||
run: python maint_tools/citation_cff_maint.py | ||
|
||
# Set up and launch a virtual browser needed for one example to run | ||
# without stalling the job. The example launches an html in the browser. | ||
- name: Set up display server for virtual browser | ||
run: Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 & | ||
|
||
- name: Build docs | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
run: | | ||
git config --global user.email "actions@github.com" | ||
git config --global user.name "GitHub actions" | ||
cd doc | ||
set -o pipefail | ||
export VERSIONTAG=$(git describe --tags --abbrev=0) | ||
make install |
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
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