[docs] deploy pages in both repositories

mikf/galleryx-dl and gdl-org/docs
pull/5126/head
Mike Fährmann 7 months ago
parent a767832332
commit 461b55da4b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -0,0 +1,82 @@
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.DISPATCH_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

@ -1,23 +0,0 @@
name: Dispatch GitHub Pages Build
on:
workflow_dispatch:
push:
branches:
- "master"
paths:
- "docs/**"
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: dispatch
run: >
curl -L
-X POST
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer ${{ secrets.DISPATCH_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"}'
Loading…
Cancel
Save