|
|
@@ -8,48 +8,32 @@ on:
|
|
|
branches:
|
|
|
- main
|
|
|
|
|
|
-permissions:
|
|
|
- contents: read
|
|
|
- pages: write
|
|
|
- id-token: write
|
|
|
-
|
|
|
-concurrency:
|
|
|
- group: pages
|
|
|
- cancel-in-progress: false
|
|
|
-
|
|
|
jobs:
|
|
|
# Runs on pull requests too, so a broken build is caught before it merges.
|
|
|
build:
|
|
|
- name: Build
|
|
|
+ name: Deploy docs
|
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
|
- - uses: actions/checkout@v7
|
|
|
-
|
|
|
- - uses: actions/configure-pages@v6
|
|
|
+ - name: Checkout main
|
|
|
+ uses: actions/checkout@v7
|
|
|
|
|
|
- # uv installs from the committed uv.lock, so the build is reproducible.
|
|
|
- - uses: astral-sh/setup-uv@v10.0.1
|
|
|
+ - name: Install uv
|
|
|
+ uses: astral-sh/setup-uv@v10.0.1
|
|
|
with:
|
|
|
enable-cache: true
|
|
|
|
|
|
- - run: uv run zensical build --clean
|
|
|
+ - name: Build docs
|
|
|
+ run: uv run zensical build --clean
|
|
|
|
|
|
# Zensical has no plugin API yet, so llms.txt and llms-full.txt are
|
|
|
# generated from the built site here.
|
|
|
- - run: uv run python scripts/gen_llms.py site
|
|
|
+ - name: Generate llms.txt
|
|
|
+ run: uv run python scripts/gen_llms.py site
|
|
|
|
|
|
- - uses: actions/upload-pages-artifact@v5
|
|
|
+ - name: Deploy to GitHub Pages
|
|
|
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
|
+ uses: peaceiris/actions-gh-pages@v4
|
|
|
with:
|
|
|
- path: site
|
|
|
-
|
|
|
- deploy:
|
|
|
- name: Deploy
|
|
|
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
|
- needs: build
|
|
|
- environment:
|
|
|
- name: github-pages
|
|
|
- url: ${{ steps.deployment.outputs.page_url }}
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - uses: actions/deploy-pages@v5
|
|
|
- id: deployment
|
|
|
+ github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+ publish_dir: ./site
|
|
|
+ cname: awesomedjango.org
|