This repository was archived by the owner on Jul 8, 2026. It is now read-only.
forked from sot/skare3
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (56 loc) · 1.7 KB
/
Copy pathpackage_docs.yml
File metadata and controls
57 lines (56 loc) · 1.7 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
name: Deploy Ska Package Docs
on:
workflow_call:
inputs:
repository:
description: Repository to deploy docs from
required: false
type: string
default: ${{ github.action_repository }}
secrets:
# This is the token used to push to the gh-pages branch
# It is a personal access token with the repo scope
token:
required: true
jobs:
build-linux:
runs-on: head
name: Deploy Docs
steps:
- name: Fetch source
uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
path: source
# this is so git fetches all metadata required by setuptools_scm to get the version
fetch-depth: 0
- name: Build docs
run: |
eval "$(/export/kadi/miniconda3/bin/conda shell.bash hook)"
conda activate ska3-masters
mkdir -p _static
make html
working-directory: source/docs
env:
PYTHONPATH: ${{ github.workspace }}/source
GITHUB_API_TOKEN: ${{ secrets.token }}
SKA: /proj/sot/ska
- name: Fetch gh-pages
uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
path: gh-pages
ref: gh-pages
token: ${{ secrets.token }}
- name: Replace docs
run: |
rm -fr gh-pages/docs/*
cp -fr source/docs/_build/html/* gh-pages/docs
- name: Commit changes
run: |
git config --global user.name 'Javier Gonzalez'
git config --global user.email 'javierggt@yahoo.com'
git add docs
git commit -am "Deploy docs"
git push
working-directory: gh-pages