Deploy site #362
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Deploy site" | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: "OpenSSL branch" | |
required: true | |
default: "master" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Fetch gh-pages branch" | |
run: git fetch origin gh-pages --depth=1 | |
- name: "Set permissions" | |
run: chmod -R a+rwX $(pwd) | |
- name: "Build site" | |
run: | | |
podman run -it -v $(pwd):/mnt -w /mnt --userns=keep-id \ | |
quay.io/openssl-ci/docs:20240711-115832 sh -c "\ | |
git config --global --add safe.directory /mnt && \ | |
python build.py ${{ github.event.inputs.branch }}" | |
- name: "Fix ownership" | |
run: sudo chown -R "${USER:-$(id -un)}" $(pwd) | |
- name: "Push gh-pages branch" | |
run: | | |
git config user.name openssl-machine | |
git config user.email [email protected] | |
git switch gh-pages | |
until git push origin gh-pages; do git pull --rebase origin gh-pages; done |