Skip to content

Revert main v3 documentation links #2

Revert main v3 documentation links

Revert main v3 documentation links #2

Workflow file for this run

name: publish-pages
on:
workflow_dispatch:
push:
branches:
- main
- v3
permissions:
contents: write
concurrency:
group: publish-pages
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out main
uses: actions/checkout@v4
with:
ref: main
path: main
- name: Check out v3
uses: actions/checkout@v4
with:
ref: v3
path: v3
- name: Assemble publication tree
run: |
root_ref="$(git -C main rev-parse HEAD)"
v3_ref="$(git -C v3 rev-parse HEAD)"
python3 main/tools/build_github_pages.py \
--root-docs main/docs \
--v3-docs v3/docs \
--output public \
--root-ref "$root_ref" \
--v3-ref "$v3_ref"
- name: Publish gh-pages branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git -C public init
git -C public config user.name "github-actions[bot]"
git -C public config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git -C public checkout -b gh-pages
git -C public add .
git -C public commit -m "Publish GitHub Pages"
git -C public push --force \
"https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" \
gh-pages