Skip to content

chore: autogen pdf from md #9

chore: autogen pdf from md

chore: autogen pdf from md #9

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: |
npm install puppeteer
- name: Start the docs server
run: |
npx live-server docs &
sleep 15
- name: Install gowitness
run: |
sudo apt-get update
sudo apt-get install -y libnss3-tools wget
wget https://github.com/sensepost/gowitness/releases/download/2.5.1/gowitness-2.5.1-linux-amd64
mv gowitness-2.5.1-linux-amd64 gowitness
chmod +x gowitness
- name: Generate URLs
run: |
node -e "
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('http://localhost:8080');
const numberOfPages = await page.evaluate(() => {
return document.querySelectorAll('.remark-slide').length;
});
const urls = Array.from({ length: numberOfPages }, (_, i) => \`http://localhost:8080/#\${i + 1}\`).join('\\n');
require('fs').writeFileSync('urls.txt', urls);
await browser.close();
})();"
- name: Print Urls
run: |
cat urls.txt
- name: Run hxn on URLs
run: |
./gowitness file -f urls.txt
- name: List hxnshots directory
run: |
echo "SS:"
ls -l screenshots