-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (52 loc) · 1.62 KB
/
main.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
name: Publish
on:
workflow_dispatch:
# Allow builds being triggered from the dea-notebooks repo
repository_dispatch:
types: [ republish-docs ]
# Build on pushes to the master branch
push:
branches:
- master
# Build on pull requests TO the master branch
pull_request:
branches:
- master
permissions:
id-token: write # This is required for requesting the JWT used by OIDC Authentication
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
name: Publish Docs
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
sudo apt-get install pandoc
- name: Fetch notebooks
run: |
git clone --depth 1 https://github.com/GeoscienceAustralia/dea-notebooks notebooks
cd notebooks && git checkout -b stable
- name: Build docs
run: |
make html
- name: Configure AWS credentials via OIDC
if: ${{ github.event_name != 'pull_request' }}
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::538673716275:role/github-actions-dea-docs
aws-region: ap-southeast-2
- name: Publish
if: ${{ github.event_name != 'pull_request' }}
env:
DISTRIBUTION_ID: ${{ secrets.DISTRIBUTION_ID }}
run: ./.deployment/deploy.sh