-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (47 loc) · 1.94 KB
/
link-docs.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
name: Deploy self
on:
push:
branches:
- main
jobs:
Run-Build-Scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- run: |
pip3 install -r scripts/requirements.txt
python scripts/link-docs.py
- name: Pull down submodules
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add .
git commit -m "Link Files"
git push --set-upstream origin main
else
echo "no changes";
fi
Trigger-New-Documentation-Release:
runs-on: ubuntu-latest
if: startsWith(github.repository, 'osg-htc/')
needs: Run-Build-Scripts
env:
OWNER: osg-htc
OSG_REPO: osg-portal-documentation
PATH_REPO: path-portal-documentation
WORKFLOW_ID: update-documentation.yml
steps:
- name: Trigger Documentation Release
run: |
# Toggle OSG Portal Documentation Site
curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.REPO_ACCESS_TOKEN }}" https://api.github.com/repos/${{env.OWNER}}/${{env.OSG_REPO}}/actions/workflows/${{env.WORKFLOW_ID}}/dispatches -d '{"ref":"master"}'
# Toggle PATh Portal Documentation Site
curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.REPO_ACCESS_TOKEN }}" https://api.github.com/repos/${{env.OWNER}}/${{env.PATH_REPO}}/actions/workflows/${{env.WORKFLOW_ID}}/dispatches -d '{"ref":"main"}'