@@ -34,15 +34,15 @@ jobs:
3434 uses : actions/checkout@v4
3535 with :
3636 fetch-depth : 0
37- submodules : ' recursive'
37+ submodules : " recursive"
3838
3939 - name : Update system packages
4040 run : sudo apt-get update -y
4141
4242 - name : Setup Python
4343 uses : actions/setup-python@v4
4444 with :
45- python-version : ' 3.x'
45+ python-version : " 3.x"
4646
4747 - name : Install Python dependencies and update cert
4848 run : |
@@ -69,24 +69,42 @@ jobs:
6969 needs :
7070 - build
7171 steps :
72- - name : Download the artifact from the previous job
73- uses : actions/download-artifact @v4
72+ - name : Checkout the GitHub Pages branch
73+ uses : actions/checkout @v4
7474 with :
75- name : generated-docs-html
76- path : .docs-html
75+ fetch-depth : 0
76+ submodules : " recursive"
77+ ref : " static/pages"
7778
78- # TODO: Implement some sort of page merging logic here so we can host
79- # separate pages for `dev`, `main` and commit hashes.
79+ - name : Ensure any previous documentation for this branch are removed
80+ run : rm -rf "./${{ github.ref }}"
8081
81- - name : Configure GitHub Pages
82- uses : actions/configure-pages@v5
83- with :
84- enablement : true
85-
86- - name : Push the rendered documentation site to GitHub Pages
87- uses : actions/upload-pages-artifact@v3
82+ - name : Download the artifact from the previous job
83+ uses : actions/download-artifact@v4
8884 with :
89- path : .docs-html
85+ name : generated-docs-html
86+ path : " ${{ github.ref }}"
9087
91- - name : Deploy to GitHub Pages
92- uses : actions/deploy-pages@v4
88+ - name : Commit and push this change
89+ run : |
90+ git config user.name "Documentation Publisher"
91+ git config user.email "dl-linode-dev-dx@akamai.com"
92+ git add .
93+ git commit -m "Rebuild ${{ github.ref }} from ${{ github.sha }}"
94+ git push origin static/pages
95+ #
96+ # # TODO: Implement some sort of page merging logic here so we can host
97+ # # separate pages for `dev`, `main` and commit hashes.
98+ #
99+ # - name: Configure GitHub Pages
100+ # uses: actions/configure-pages@v5
101+ # with:
102+ # enablement: true
103+ #
104+ # - name: Push the rendered documentation site to GitHub Pages
105+ # uses: actions/upload-pages-artifact@v3
106+ # with:
107+ # path: .docs-html
108+ #
109+ # - name: Deploy to GitHub Pages
110+ # uses: actions/deploy-pages@v4
0 commit comments