1414
1515concurrency :
1616 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17- cancel-in-progress : true
17+ cancel-in-progress : ${{ github.ref != 'refs/heads/develop' && !startsWith(github.ref, 'refs/tags/v') }}
1818
1919jobs :
2020 # Test documentation build
@@ -122,17 +122,28 @@ jobs:
122122 id : deployment
123123 uses : actions/deploy-pages@v4
124124
125- # Create versioned documentation on tag creation
125+ # Create and deploy versioned documentation on tag creation
126126 version-docs :
127127 if : startsWith(github.ref, 'refs/tags/v')
128- needs : [build-docs]
129128 runs-on : ubuntu-latest
129+ environment :
130+ name : github-pages
131+ url : ${{ steps.deployment.outputs.page_url }}
132+
133+ permissions :
134+ contents : read
135+ pages : write
136+ id-token : write
137+
130138 steps :
131139 - name : Checkout repository
132140 uses : actions/checkout@v5
133141 with :
134142 fetch-depth : 0
135143
144+ - name : Setup Pages
145+ uses : actions/configure-pages@v5
146+
136147 - name : Setup Node.js
137148 uses : actions/setup-node@v5
138149 with :
@@ -161,10 +172,19 @@ jobs:
161172 sudo apt update
162173 sudo apt install -y protobuf-compiler
163174
175+ - name : Setup Rust
176+ uses : dtolnay/rust-toolchain@stable
177+ with :
178+ components : rustfmt
179+ # This should be in line with the verison in:
180+ # - Makefile
181+ # - ./github/workflows/docs.yaml
182+ # - ./github/workflows/fmt.yaml
183+ # - ./github/workflows/lint.yaml
184+ toolchain : nightly
185+
164186 - name : Build versioned documentation
165- run : |
166- cd website
167- npm run build
187+ run : make docs-build
168188 env :
169189 NODE_ENV : production
170190
@@ -182,3 +202,12 @@ jobs:
182202 path : |
183203 mina-docs-${{ steps.version.outputs.version }}.tar.gz
184204 mina-docs-${{ steps.version.outputs.version }}.zip
205+
206+ - name : Upload to GitHub Pages
207+ uses : actions/upload-pages-artifact@v4
208+ with :
209+ path : website/build
210+
211+ - name : Deploy to GitHub Pages
212+ id : deployment
213+ uses : actions/deploy-pages@v4
0 commit comments