110 lines (109 loc) · 3.26 KB
/
update_documentation.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Update Documentation
on:
push:
pull_request:
schedule:
- cron: '0 4 * * 1-5'
jobs:
# check_markdown_syntax:
# name: Check Markdown Syntax
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: 2.7
# - name: Install markdownlint
# run: |
# gem install mdl
# - name: Lint docs
# run: |
# ./tools/check-docs.sh
# check_file_names:
# name: Check File Names
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Check file names
# run: |
# ./tools/check-file-names.sh
# check_shell_scripts:
# name: Check Shell Scripts
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Install dependencies
# run: |
# sudo apt-get install --yes shellcheck
# - name: Check Shell Scripts
# run: |
# shellcheck **/*.sh
# check_python_scripts:
# name: Check Python Scripts
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Install dependencies
# run: |
# pip install -r tools/requirements.txt
# - name: Run black
# run: |
# black --check .
# - name: Run isort
# run: |
# isort --profile black --filter-files --check .
# - name: Run flake8
# run: |
# flake8 --config tools/.flake8
# - name: MyPy
# run: |
# mypy --ignore-missing-imports .
build:
name: Build
needs: [check_markdown_syntax, check_file_names, check_shell_scripts, check_python_scripts]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: rucio/rucio
ref: master
path: tools/run_in_docker/rucio
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install rucio-api generation dependencies and build markdown sites for the API
run: |
python3 -m pip install -U pip setuptools
python3 -m pip install -U -r tools/requirements.txt
docker login https://docker.pkg.github.com -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
./tools/build_documentation.sh
docker logout https://docker.pkg.github.com
- name: Install dependencies and static website
run: |
cd website
yarn install
yarn build
- uses: actions/upload-artifact@master
with:
name: documentation-artifacts
path: website/build
# deploy:
# name: Deploy
# needs: build
# if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/download-artifact@master
# with:
# name: documentation-artifacts
# path: website/build
# - name: Push to Github Pages branch
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: ./publish.sh