44 push :
55 branches : [main]
66
7- env :
8- BRANCH_NAME : ${{ github.event.ref.BRANCH_NAME }}
7+ permissions : {}
98
109jobs :
1110 get_config_values :
1211 uses : NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
12+ permissions :
13+ attestations : read
14+ contents : read
15+ packages : read
1316 with :
1417 verify_published_from_main_image : true
1518
1619 quality_checks :
1720 needs : [get_config_values]
1821 uses : NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
22+ permissions :
23+ contents : read
24+ id-token : write
25+ packages : read
1926 with :
2027 pinned_image : ${{ needs.get_config_values.outputs.pinned_image }}
2128 secrets :
@@ -36,15 +43,17 @@ jobs:
3643 permissions :
3744 id-token : write
3845 contents : write
46+ packages : write
3947 with :
4048 dry_run : false
4149 pinned_image : ${{ needs.get_config_values.outputs.pinned_image }}
4250 branch_name : main
4351 tag_format : ${{ needs.get_config_values.outputs.tag_format }}
44- secrets : inherit
4552 generate_behave_steps_catalog :
4653 needs : [quality_checks, get_config_values]
4754 runs-on : ubuntu-22.04
55+ permissions :
56+ contents : write
4857 container :
4958 image : ${{ needs.get_config_values.outputs.pinned_image }}
5059 options : --user 1001:1001 --group-add 128
5867 - name : Checkout code
5968 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
6069 with :
61- ref : ${{ env.BRANCH_NAME }}
70+ persist-credentials : false
6271 fetch-depth : 0
6372
6473 - name : Cache Virtualenv
@@ -71,11 +80,15 @@ jobs:
7180 - name : Install python packages
7281 if : steps.cache-venv.outputs.cache-hit != 'true'
7382 run : make install
74-
83+ - name : Checkout gh-pages
84+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
85+ with :
86+ ref : gh-pages
87+ path : gh-pages
88+ persist-credentials : true
7589 - name : Generate Behave steps catalog as HTML
7690 run : |
7791 set +H # Disable history expansion to prevent !DOCTYPE error
78- mkdir -p docs
7992 {
8093 echo "<!DOCTYPE html>"
8194 echo "<html lang='en'>"
@@ -99,11 +112,13 @@ jobs:
99112 echo " </pre>"
100113 echo "</body>"
101114 echo "</html>"
102- } > docs /index.html
115+ } > gh-pages /index.html
103116
104- - name : Deploy to GitHub Pages
105- uses : peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
106- with :
107- github_token : ${{ secrets.GITHUB_TOKEN }}
108- publish_dir : ./docs
109- publish_branch : gh-pages # Change if using another branch
117+ - name : Update docs in github pages
118+ run : |
119+ cd gh-pages
120+ git config user.name github-actions
121+ git config user.email github-actions@github.com
122+ git add "index.html"
123+ git commit -m "update behave catalogue"
124+ parallel --retries 10 --delay 3 ::: "git pull --rebase && git push"
0 commit comments