Automatic ICD generation #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pages.yml | |
| on: | |
| push: | |
| branches: | |
| - "main_protected" | |
| jobs: | |
| build: | |
| name: "Generate pages" | |
| runs-on: "ubuntu-22.04" | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: application | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Disable man-db auto-update | |
| run: sudo rm -f /var/lib/man-db/auto-update | |
| - name: Generate skeleton | |
| run: | | |
| mkdir -p _site | |
| cat << EOF > _site/index.html | |
| <!DOCTYPE html> | |
| <meta charset=utf-8> | |
| <title>Redirecting...</title> | |
| <link rel=canonical href="./icd/"> | |
| <meta http-equiv=refresh content="0; url=./icd/"> | |
| EOF | |
| mkdir -p _site/icd | |
| - name: Download & install asn1scc | |
| working-directory: ${{ runner.temp }} | |
| run: | | |
| wget "https://github.com/scsd-cdh/asn1scc/releases/latest/download/asn1scc.linux.x86_64.zip" -O asn1scc.zip | |
| unzip -d asn1scc asn1scc.zip | |
| - name: Generate ICD | |
| run: | | |
| ls -l . | |
| ls -l APP | |
| find APP/_asn1 | |
| ${{ runner.temp }}/asn1scc/asn1scc --icdacn icd.html APP/_asn1/*.asn1 | |
| mv icd.css _site/icd/icd.css | |
| mv icd_new.html _site/icd/index.html | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '_site' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |