Skip to content

Bump actions/checkout from 3.1.0 to 4.2.0 #1938

Bump actions/checkout from 3.1.0 to 4.2.0

Bump actions/checkout from 3.1.0 to 4.2.0 #1938

Workflow file for this run

name: Docs
on:
# Manually triggerable in github
workflow_dispatch:
# When a push occurs on either of these branches
push:
branches:
- master
- development
# When a push occurs on a PR that targets these branches
pull_request:
branches:
- master
- development
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install -e .[docs,examples]
- name: Make docs
run: |
cd doc
make html
- name: Check links
run: |
cd doc
make linkcheck
- name: Pull latest gh-pages
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
run: |
cd ..
git clone https://github.com/automl/auto-sklearn.git --branch gh-pages --single-branch gh-pages
- name: Copy new doc into gh-pages
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
run: |
branch_name=${GITHUB_REF##*/}
cd ../gh-pages
rm -rf $branch_name
cp -r ../auto-sklearn/doc/build/html $branch_name
- name: Push to gh-pages
if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push'
run: |
last_commit=$(git log --pretty=format:"%an: %s")
cd ../gh-pages
branch_name=${GITHUB_REF##*/}
git add $branch_name/
git config --global user.name 'Github Actions'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "$last_commit"
git push