Skip to content

Commit 8f2a59d

Browse files
committed
Automatic ICD generation
1 parent 3b56ea9 commit 8f2a59d

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/pages.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: pages.yml
2+
on:
3+
push:
4+
branches:
5+
- "main_protected"
6+
7+
jobs:
8+
build:
9+
name: "Generate pages"
10+
runs-on: "ubuntu-22.04"
11+
12+
environment:
13+
name: github-pages
14+
url: ${{ steps.deployment.outputs.page_url }}
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Pages
20+
uses: actions/configure-pages@v5
21+
22+
- name: Disable man-db auto-update
23+
run: sudo rm -f /var/lib/man-db/auto-update
24+
25+
- name: Generate skeleton
26+
run: |
27+
mkdir -p _site
28+
cat << EOF > _site/index.html
29+
<!DOCTYPE html>
30+
<meta charset=utf-8>
31+
<title>Redirecting...</title>
32+
<link rel=canonical href="./icd/">
33+
<meta http-equiv=refresh content="0; url=./icd/">
34+
EOF
35+
36+
mkdir -p _site/icd
37+
38+
- name: Download & install asn1scc
39+
working-directory: ${{ runner.temp }}
40+
run: |
41+
wget "https://github.com/scsd-cdh/asn1scc/releases/latest/download/asn1scc.linux.x86_64.zip" -O asn1scc.zip
42+
unzip -d asn1scc asn1scc.zip
43+
44+
- name: Generate ICD
45+
run: |
46+
ls -l .
47+
ls -l APP
48+
find APP/_asn1
49+
${{ runner.temp }}/asn1scc/asn1scc --icdacn icd.html APP/_asn1/*.asn1
50+
mv icd.css _site/icd/icd.css
51+
mv icd_new.html _site/icd/index.html
52+
53+
- name: Upload artifact
54+
uses: actions/upload-pages-artifact@v3
55+
with:
56+
path: '_site'
57+
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)