Skip to content

Commit a6d754c

Browse files
olyagplfniephaus
authored andcommitted
Build website via GHA and deploy to graalpy.org.
1 parent adb460a commit a6d754c

8 files changed

Lines changed: 78 additions & 13 deletions
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build and deploy website
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docs/site/**'
7+
- '.github/workflows/build-website.yml'
8+
push:
9+
branches:
10+
- master
11+
paths:
12+
- 'docs/site/**'
13+
- '.github/workflows/build-website.yml'
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Check out repository
34+
uses: actions/checkout@v6
35+
- name: Set up Ruby
36+
uses: ruby/setup-ruby@v1
37+
with:
38+
ruby-version: '3.2'
39+
- name: Install website dependencies
40+
working-directory: docs/site
41+
run: bundle install
42+
- name: Build website
43+
working-directory: docs/site
44+
env:
45+
JEKYLL_ENV: production
46+
run: bundle exec jekyll build
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v5
49+
with:
50+
path: docs/site/_site
51+
52+
deploy:
53+
# The website should only be deployed from a release branch:
54+
# if: startsWith(github.head_ref, 'release/graal-vm/')
55+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
56+
runs-on: ubuntu-latest
57+
needs: build
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v5

docs/site/01-python-developers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ audience_identifier: python
2929
<h4>Single-Binary Packaging</h4>
3030
</div>
3131
<div class="langpage__benefits-text">
32-
<h5>Package Python applications as a <a href="/python/python-developers/docs/#python-standalone-applications">single binary</a></h5>
32+
<h5>Package Python applications as a <a href="{{ '/python-developers/docs/#python-standalone-applications' | relative_url }}">single binary</a></h5>
3333
</div>
3434
</div>
3535
<div class="langbenefits__card">
@@ -74,8 +74,8 @@ audience_identifier: python
7474
<h3 class="langstarter__title">Install or Download</h3>
7575
<div>
7676
<h5 class="download-text">
77-
GraalPy is available for multiple platforms. Distributions based on Oracle GraalVM provide the best performance and advanced features and are released under the <a href="https://www.oracle.com/downloads/licenses/graal-free-license.html">GFTC license</a>. Distributions based on GraalVM Community Edition, released under the OSI-approved <a href="https://opensource.org/licenses/UPL">UPL license</a>, are available on <a href="https://github.com/oracle/graalpython/releases">GitHub</a>.
78-
See <a href="/python/python-developers/docs/#choosing-a-graalpy-distribution">Choosing a GraalPy Distribution</a> for guidance on available distributions.
77+
GraalPy is available for multiple platforms in two variants: <strong class="language-downloads__variant-native">Native</strong> (for a compact download size and smaller footprint) and <strong class="language-downloads__variant-jvm">JVM</strong> (for full Java interoperability). Distributions based on Oracle GraalVM provide the best performance and advanced features and are released under the <a href="https://www.oracle.com/downloads/licenses/graal-free-license.html">GFTC license</a>. Distributions based on GraalVM Community Edition, released under the OSI-approved <a href="https://opensource.org/licenses/UPL">UPL license</a>, are available on <a href="https://github.com/oracle/graalpython/releases">GitHub</a>.
78+
See <a href="{{ '/python-developers/docs/#choosing-a-graalpy-distribution' | relative_url }}">Choosing a GraalPy Distribution</a> for guidance on selecting the appropriate runtime.
7979
</h5>
8080
</div>
8181
<div class="languages__example-card">

docs/site/03-jvm-developers-compatibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ img.pylogo {
166166
});
167167
var module_testing_csv = new Promise(function (resolve, reject) {
168168
const xhr = new XMLHttpRequest();
169-
const url = `/python/module_results/python-module-testing-${graalpyVersion}.csv`;
169+
const url = `{{ '/module_results/' | relative_url }}python-module-testing-${graalpyVersion}.csv`;
170170
xhr.open('GET', url);
171171
xhr.overrideMimeType('text/plain');
172172
xhr.onload = function () {
@@ -183,7 +183,7 @@ img.pylogo {
183183
});
184184
var wheels_csv = new Promise(function (resolve, reject) {
185185
const xhr = new XMLHttpRequest();
186-
const url = `/python/wheels/${graalpyVersion}.csv`;
186+
const url = `{{ '/wheels/' | relative_url }}${graalpyVersion}.csv`;
187187
xhr.open('GET', url);
188188
xhr.overrideMimeType('text/plain');
189189
xhr.onload = function () {

docs/site/03-python-developers-compatibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ img.pylogo {
166166
});
167167
var module_testing_csv = new Promise(function (resolve, reject) {
168168
const xhr = new XMLHttpRequest();
169-
const url = `/python/module_results/python-module-testing-${graalpyVersion}.csv`;
169+
const url = `{{ '/module_results/' | relative_url }}python-module-testing-${graalpyVersion}.csv`;
170170
xhr.open('GET', url);
171171
xhr.overrideMimeType('text/plain');
172172
xhr.onload = function () {
@@ -183,7 +183,7 @@ img.pylogo {
183183
});
184184
var wheels_csv = new Promise(function (resolve, reject) {
185185
const xhr = new XMLHttpRequest();
186-
const url = `/python/wheels/${graalpyVersion}.csv`;
186+
const url = `{{ '/wheels/' | relative_url }}${graalpyVersion}.csv`;
187187
xhr.open('GET', url);
188188
xhr.overrideMimeType('text/plain');
189189
xhr.onload = function () {

docs/site/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
graalpy.org

docs/site/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
baseurl: "/python"
2-
url: "https://graalvm.org"
1+
baseurl: ""
2+
url: "https://graalpy.org"
33
github: "oracle/graalpython"
44
language_version: 25.0.2
55
python_version: 3.12

docs/site/docs-redirect.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ redirect_to: jvm-developers/docs/
55
---
66

77
<script>
8-
window.location.replace('/python/jvm-developers/docs/');
8+
window.location.replace({{ '/jvm-developers/docs/' | relative_url | jsonify }});
99
</script>
1010

1111
<noscript>
12-
<meta http-equiv="refresh" content="0; url=/python/jvm-developers/docs/" />
12+
<meta http-equiv="refresh" content="0; url={{ '/jvm-developers/docs/' | relative_url }}" />
1313
</noscript>
1414

15-
<p>Redirecting to the documentation for <a href="/python/jvm-developers/docs/">JVM Developers</a>...</p>
15+
<p>Redirecting to the documentation for <a href="{{ '/jvm-developers/docs/' | relative_url }}">JVM Developers</a>...</p>

docs/user/Python-Standalone-Applications.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The module bundles all your application's resources into a single file.
1313
1414
## Running Python Standalone Applications
1515

16-
To create an native executable from a Python file with its dependencies, use this command:
16+
To create a native executable from a Python file with its dependencies, use this command:
1717

1818
```bash
1919
graalpy -m standalone native \

0 commit comments

Comments
 (0)