Skip to content

Commit 56ee3e0

Browse files
committed
Deploy a snapshot of the specification to GitHub pages
This makes it easier to view the latest snapshot without having to download a PDF from the releases page. The snapshots are deployed at the following URLs: - [Unprivileged spec](https://riscv.github.io/riscv-isa-manual/snapshot/unprivileged/). - [Privileged spec](https://riscv.github.io/riscv-isa-manual/snapshot/privileged/). The HTML is deployed to a snapshot/ subdirectory to make it possible to also deploy versioned releases in the future.
1 parent 0a36d5f commit 56ee3e0

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/isa-build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,36 @@ jobs:
129129
env:
130130
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}
131131

132+
# Create directory structure pages sites for privileged and unprivileged specs.
133+
- name: Make GitHub pages directory
134+
run: |
135+
mkdir -p dist/snapshot/unprivileged dist/snapshot/privileged
136+
cp build/riscv-unprivileged.html dist/snapshot/unprivileged/index.html
137+
cp build/riscv-privileged.html dist/snapshot/privileged/index.html
138+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
139+
140+
- name: Upload pages artifact
141+
uses: actions/upload-pages-artifact@v3
142+
with:
143+
path: dist
144+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
145+
146+
# Deploy HTML to Github pages.
147+
deploy:
148+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
149+
150+
needs: build
151+
152+
permissions:
153+
pages: write
154+
id-token: write
155+
156+
environment:
157+
name: github-pages
158+
url: ${{ steps.deployment.outputs.page_url }}
159+
160+
runs-on: ubuntu-latest
161+
steps:
162+
- name: Deploy to GitHub Pages
163+
id: deployment
164+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)