Skip to content

Commit

Permalink
Make manual the CI website deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
folmos-at-orange committed Dec 11, 2024
1 parent 819fe03 commit d89d114
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,42 @@
---
name: ci
name: Website
on:
push:
branches: [master, main]
workflow_dispatch:
inputs:
deploy-gh-pages:
description: Deploy to GH Pages
required: true
type: boolean
default: true
pull_request:
permissions:
contents: write
jobs:
deploy:
build-or-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install requirements
run: pip install -r requirements.txt
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
- name: Set Cache ID
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- name: Cache mkdocs-material
uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material mkdocs-jupyter
- run: mkdocs gh-deploy --force
- name: Build site
if: github.event_name == 'pull_request' || inputs.deploy-gh-pages == false
run: mkdocs build
- name: Deploy site to GH pages
if: github.event_name == 'workflow_dispatch' && inputs.deploy-gh-pages == true
run: mkdocs gh-deploy --force
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ To update various versions in the website, you only have to change the following


## Deploy to khiops.org
Once you have committed and pushed your changes. Use the `ci` workflow in the repo's actions.
Once you have committed and pushed your changes, go to the "Actions" tab on Github and execute the
`Website` workflow on the `main` branch.

0 comments on commit d89d114

Please sign in to comment.