mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-23 03:02:50 +01:00
3c979e1f05
needs some form of release notes, probably just git commits since last stable release
83 lines
1.6 KiB
YAML
83 lines
1.6 KiB
YAML
name: GitHub Pages
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- docs/**
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
dispatch:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Dispatch to gdl-org/docs
|
|
run: >
|
|
curl -L
|
|
-X POST
|
|
-H "Accept: application/vnd.github+json"
|
|
-H "Authorization: Bearer ${{ secrets.REPO_TOKEN }}"
|
|
-H "X-GitHub-Api-Version: 2022-11-28"
|
|
https://api.github.com/repos/gdl-org/docs/actions/workflows/pages.yml/dispatches
|
|
-d '{"ref":"master"}'
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/configure-pages@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install Docutils
|
|
run: pip install docutils pygments
|
|
|
|
- name: Update Links
|
|
working-directory: ./docs/
|
|
run: sed --in-place 's/\.\(rst\|md\)\b/.html/g' -- *.md *.rst
|
|
|
|
- name: reStructuredText to HTML
|
|
working-directory: ./docs/
|
|
run: |
|
|
while read -r RST
|
|
do
|
|
python -m docutils --writer=html --output="${RST%.rst}.html" -- "$RST"
|
|
done < <(find . -type f -name "*.rst")
|
|
|
|
- uses: actions/jekyll-build-pages@v1
|
|
with:
|
|
source: ./docs/
|
|
destination: ./_site/
|
|
|
|
- uses: actions/upload-pages-artifact@v3
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
steps:
|
|
- uses: actions/deploy-pages@v4
|
|
id: deployment
|