-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.66 KB
/
doc.yml
File metadata and controls
61 lines (51 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and Deploy Package Doc
on:
push:
branches:
- main # Trigger the workflow on pushes to the main branch
jobs:
docbuild:
runs-on: ubuntu-latest
# Environment required for GitHub Pages deployment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Install dependencies
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
init-shell: bash
# Install the package in development mode
- name: Install package in development mode
shell: bash -l {0}
run: |
micromamba activate map-binning
pip install -e .
# Build the package documentation
- name: Build Jupyter Book
shell: bash -l {0}
env:
COPERNICUSMARINE_SERVICE_USERNAME: ${{ secrets.COPERNICUSMARINE_SERVICE_USERNAME }}
COPERNICUSMARINE_SERVICE_PASSWORD: ${{ secrets.COPERNICUSMARINE_SERVICE_PASSWORD }}
run: |
micromamba activate map-binning
jupyter-book build doc/
# Upload Pages artifact
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: doc/_build/html
# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4