Skip to content

Commit

Permalink
Merge pull request #1 from jmtd/repository-moved
Browse files Browse the repository at this point in the history
[OPENJDK-3391] Generate HTTP redirect pages to new site
  • Loading branch information
jmtd authored Nov 7, 2024
2 parents ce8504d + 540e71a commit a37b036
Show file tree
Hide file tree
Showing 4 changed files with 617 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/gendocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Generate docs for OpenJDK images
on:
push:
branches:
- 'repository-moved'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
gendocs:
name: Generate documentation
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2

- name: Generate docs
run: |
./docs/create.sh
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
16 changes: 16 additions & 0 deletions docs/create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
if [ -d docs ]; then
cd docs
fi

prefix=https://rh-openjdk.github.io/redhat-openjdk-containers/

while read path; do
d="$(dirname $path)"
mkdir -p "$d"
uri="$prefix/$path"

sed "s!DESTINATION!$uri!g" \
moved.html \
> "$path"

done < uris_to_create
Loading

0 comments on commit a37b036

Please sign in to comment.