Skip to content

Commit 5621ad3

Browse files
committed
add deploy site workflow
1 parent 2245d30 commit 5621ad3

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/deploy-site.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Deploy site"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: "OpenSSL branch"
8+
required: true
9+
default: "master"
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: "Fetch gh-pages branch"
17+
run: git fetch origin gh-pages --depth=1
18+
- name: "Set permissions"
19+
run: chmod -R a+rwX $(pwd)
20+
- name: "Build site"
21+
run: |
22+
podman run -it -v $(pwd):/mnt -w /mnt --userns=keep-id \
23+
quay.io/openssl-ci/docs:20240705-204944 \
24+
python build.py ${{ github.event.inputs.branch }}

build.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def build_manpages(tmp_dir: str):
3232

3333

3434
def clean_docs():
35-
shutil.rmtree("docs/")
35+
try:
36+
shutil.rmtree("docs/")
37+
except FileNotFoundError:
38+
pass
3639

3740

3841
def create_dirs():
@@ -67,7 +70,7 @@ def copy_images(tmp_dir: str):
6770

6871

6972
def build_site(version: str):
70-
return subprocess.run(["mike", "deploy", version, "--ignore-remote-status"]).returncode
73+
return subprocess.run(["mike", "deploy", version]).returncode
7174

7275

7376
def main():

scaffold/robots.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Disallow: /

0 commit comments

Comments
 (0)