-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.56 KB
/
create-rst.yml
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
62
63
64
65
66
name: IRAF Readthedocs generation
on:
push:
schedule:
- cron: '30 5 * * 1,3,5'
jobs:
create-rst:
runs-on: ubuntu-latest
env:
iraf: ${{ github.workspace }}/iraf/
TERM: ansi
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout latest IRAF master
uses: actions/checkout@v4
with:
repository: iraf-community/iraf
path: ${{ env.iraf }}
- name: Install IRAF binaries and PyRAF
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends iraf python3-pyraf python3-lxml python3-html5lib
ln -sf /usr/lib/iraf/bin ${iraf}bin
- name: Checkout external packages
run: |
rm -rf ${iraf}extern/*
git clone --depth=1 https://github.com/iraf-community/iraf-fitsutil.git ${iraf}extern/fitsutil
git clone --depth=1 https://github.com/iraf-community/iraf-sptable.git ${iraf}extern/sptable
git clone --depth=1 https://github.com/iraf-community/iraf-mscred.git ${iraf}extern/mscred
git clone --depth=1 https://github.com/iraf-community/iraf-nfextern.git ${iraf}extern/nfextern
git clone --depth=1 https://github.com/iraf-community/iraf-ctio.git ${iraf}extern/ctio
git clone --depth=1 https://github.com/iraf-community/iraf-xdimsum.git ${iraf}extern/xdimsum
git clone --depth=1 https://gitlab.com/nsf-noirlab/csdc/usngo/iraf/st4gem.git ${iraf}extern/st4gem
mkdir -p ${iraf}extern/rvsao
curl http://tdc-www.harvard.edu/iraf/rvsao/rvsao-2.8.5.tar.gz | tar xzf - -C ${iraf}extern/rvsao --strip-components=1
- name: Create ReStructuredText documents
run: |
python3 tools/irafdocs.py
- name: Create Pull Request
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
commit-message: Auto-updated IRAF documentation
committer: '[bot] IRAF doc autoupdate <[email protected]>'
author: '[bot] IRAF doc autoupdate <[email protected]>'
branch: doc-autoupdate
title: Auto-updated IRAF documentation
- name: Directly push new docs on non-main branches
if: github.ref != 'refs/heads/main'
run: |
git config --global user.name '[bot] IRAF doc autoupdate'
git config --global user.email '[email protected]'
git add --all doc
git commit -m "Auto-updated IRAF documentation" || exit 0
git push