Repository navigation
59 lines (48 loc) · 1.64 KB
/
Copy pathdeploy_github_pages.yml
File metadata and controls
59 lines (48 loc) · 1.64 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Deploy GitHub Pages
on:
workflow_run:
workflows: ["Post-Submit CI"]
branches: [main]
types:
- completed
jobs:
build-and-deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: windows-latest
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v7.0.0
- name: Build docs
run: cargo docs
- name: Download Coverage HTML Report
uses: actions/download-artifact@v8
with:
name: coverage-html-report
path: coverage_html/
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
run-id: ${{ github.event.workflow_run.id }}
- name: Create unified site structure
shell: bash
run: |
mkdir -p unified_site
mkdir -p unified_site/docs
cp -r target/doc/* unified_site/docs/
cp -r coverage_html unified_site/coverage
cp templates/github-pages-index.html unified_site/index.html
cp res/csshw.ico unified_site/favicon.ico
cp res/csshw.svg unified_site/csshw.svg
echo "<meta http-equiv=\"refresh\" content=\"0; url=csshw_lib/index.html\">" > unified_site/docs/index.html
- name: Upload unified site
uses: actions/upload-pages-artifact@v5
with:
retention-days: 1
path: unified_site/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5