Skip to content

Commit

Permalink
new actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Nov 17, 2023
1 parent 7ebc05d commit e087c50
Showing 1 changed file with 4 additions and 48 deletions.
52 changes: 4 additions & 48 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,70 +13,26 @@ on:
jobs:
build:
name: build and deploy docs
runs-on: macos-latest
runs-on: windows-latest
defaults:
run:
shell: powershell
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: conda-incubator/setup-miniconda@v2.0.0
with:
miniconda-version: "latest"
activate-environment: igl
channels: conda-forge
python-version: 3.8

- name: build
run: |
conda install git cmake">=3.14" boost eigen=3.3 compas --yes
pip install -r requirements-dev.txt
invoke docs
- uses: compas-dev/compas-actions.docs@v1.3.0
id: docs
with:
dest: deploy
build_to_subfolder: true
install_dependencies: false
build_docs: false

- name: Deploy docs
if: success() && steps.docs.outputs.commit_type != 'pull'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: deploy
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
commit_type: ${{ steps.docs.outputs.commit_type }}
current_version: ${{ steps.docs.outputs.current_version }}

docVersions:
needs: build
if: needs.build.outputs.commit_type == 'tag'
name: update doc versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages

- uses: compas-dev/compas-actions.docversions@v1.3.0
with:
current_version: ${{ needs.build.outputs.current_version }}

- name: Deploy docs
if: success()
uses: crazy-max/ghaction-github-pages@v2
- uses: compas-dev/compas-actions.docs@v2
with:
target_branch: gh-pages
build_dir: ./
keep_history: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
use_conda: true

0 comments on commit e087c50

Please sign in to comment.