Skip to content

update

update #5

Workflow file for this run

name: update
permissions:
contents: read
on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
run-id:
description: 'GHA docs workflow run ID'
required: true
type: string
push:
description: 'Push'
required: true
default: false
type: boolean
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download documentation artifact
uses: actions/download-artifact@v4
with:
repository: mpi4py/mpi4py
run-id: ${{ inputs.run-id }}
name: mpi4py-docs
- name: Update documentation contents
run: |
# unarchive
docdir=mpi4py-docs
unzip -q $docdir.zip
mv $docdir/version .
version=$(cat version)
test ! -d $version
mv $docdir $version
rm -f stable
ln -sf $version stable
- name: Commit changes
run: |
# git add + commit
git config user.name "$(git log -1 --pretty=format:%an)"
git config user.email "$(git log -1 --pretty=format:%ae)"
version=$(cat version)
git add $version stable
git commit -m $version
- name: Show changes
run: git show --stat
- name: Push changes
if: ${{ inputs.push }}
run: git push