diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml new file mode 100644 index 0000000..4e971c1 --- /dev/null +++ b/.github/workflows/hugo.yml @@ -0,0 +1,42 @@ +name: Deploy Hugo and TypeDoc Site to GitHub Pages + +on: + push: + branches: + - main + +jobs: + build-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.135.0' + extended: true + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.11.0' + + - name: Install Dependencies + run: npm install + + - name: Generate TypeDoc Documentation + run: npx typedoc --skipErrorChecking + + - name: Build Hugo site + run: | + cd site && hugo --minify + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site/public + publish_branch: gh-pages