43 lines
1.6 KiB
YAML
43 lines
1.6 KiB
YAML
name: Generate GitHub Pages
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# At 00:00 on every Tuesday UTC
|
|
- cron: '0 0 * * 2'
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
generate-github-pages:
|
|
runs-on: ubuntu-latest
|
|
# Skip in forks
|
|
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }}
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: ⏬ Checkout with LFS
|
|
uses: nschloe/action-cached-lfs-checkout@1c185ad576953eab13e35ffe1bffef437d97e9d2 # v1.2.4
|
|
- name: Use JDK 21
|
|
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
|
with:
|
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
|
java-version: '21'
|
|
- name: Configure gradle
|
|
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
|
|
with:
|
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: 3.14
|
|
- name: Run World screenshots generation script
|
|
run: |
|
|
./tools/test/generateWorldScreenshots.py
|
|
mkdir -p screenshots/en
|
|
cp tests/uitests/src/test/snapshots/images/* screenshots/en
|
|
- name: Deploy GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./screenshots
|