-
Notifications
You must be signed in to change notification settings - Fork 23
42 lines (34 loc) · 1.31 KB
/
deploy.yaml
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
name: Deploy
on:
workflow_dispatch: # triggered by Core to rebuild the documentation when code comments change
push:
branches: [ main ]
jobs:
validate:
uses: ./.github/workflows/validate.yaml
deploy:
runs-on: ubuntu-latest
needs: [ validate ] # also depends on `build-and-cache` job for cached build, not repeated to avoid building twice
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Restore built files
uses: actions/cache@v4
with:
path: build/html
key: build-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ github.sha }}
fail-on-cache-miss: true # depend entirely on the build step
- name: Deploy built directory to openfisca.org website
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.OPENFISCADOTORG_DEPLOY_KEY }}
publish_dir: build/html
external_repository: openfisca/openfisca.org
destination_dir: doc
publish_branch: gh-pages
user_email: bot@openfisca.org
user_name: OpenFisca Bot
commit_message: Publish latest changes from # will be suffixed with "openfisca/openfisca-doc@<commit_sha>"