Deploy site #14
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: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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: "Change branch" | |
run: git switch gh-pages | |
- name: "Setup GitHub Pages" | |
uses: actions/configure-pages@v5 | |
- name: "Upload artifact" | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "." | |
- name: "Deploy to GitHub Pages" | |
uses: actions/deploy-pages@v4 |