-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (33 loc) · 1.08 KB
/
deploy-site.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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