Skip to content

Banners update

Banners update #43

Workflow file for this run

name: Docs
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy includes
shell: bash
run: |
cp -R examples docs/_includes
- name: Gather changelog
shell: python
run: |
import requests
base_url = "https://api.github.com/repos/${{ github.repository }}"
r = requests.get(f"{base_url}/releases?per_page=100", headers={
"Authorization": "Bearer ${{ secrets.GITHUB_TOKEN }}",
"X-GitHub-Api-Version": "2022-11-28",
})
assert r.ok, r.text
with open("docs/changelog.md", "a") as f:
for release in r.json():
if not release['draft']:
print(file=f)
print(f"# [{release['name']}]({release['html_url']})", file=f)
print(file=f)
print(release['body'], file=f)
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4