Jekyll-ify GitHub pages website #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flatter | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: {} | |
jobs: | |
build: | |
name: Build Flatpak with Flatter | |
runs-on: ubuntu-latest | |
container: | |
image: bilelmoussaoui/flatpak-github-actions:freedesktop-24.08 | |
options: --privileged | |
strategy: | |
matrix: | |
arch: [x86_64, aarch64] | |
fail-fast: false | |
max-parallel: 1 | |
steps: | |
- name: Setup Docker | |
if: ${{ matrix.arch == 'aarch64' }} | |
shell: bash --noprofile --norc -eu -o pipefail -x {0} | |
run: | | |
dnf update -y | |
dnf install -y docker | |
- name: Setup QEMU | |
if: ${{ matrix.arch == 'aarch64' }} | |
id: qemu | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup GPG | |
id: gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
- name: Build with Flatter | |
uses: andyholmes/flatter@main | |
with: | |
files: | | |
com.jetbrains.PhpStorm.json | |
arch: ${{ matrix.arch }} | |
gpg-sign: ${{ steps.gpg.outputs.fingerprint }} | |
flatpak-builder-args: | | |
--install-deps-from=flathub | |
upload-bundles: true | |
upload-pages-artifact: ${{ matrix.arch == 'aarch64' }} | |
upload-pages-includes: | | |
flatter/_config.yml | |
flatter/base.css | |
flatter/default.css | |
flatter/index.html | |
deploy: | |
name: Build GitHub Pages website | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Delete artifacts | |
uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: '*' | |
- name: Prepare website | |
shell: bash --noprofile --norc -eu -o pipefail -x {0} | |
run: | | |
mkdir src/ | |
tar -C src/ -xvf github-pages/artifact.tar | |
mv com.jetbrains.PhpStorm-x86_64/com.jetbrains.PhpStorm.flatpak src/com.jetbrains.PhpStorm-x86_64.flatpak | |
mv com.jetbrains.PhpStorm-aarch64/com.jetbrains.PhpStorm.flatpak src/com.jetbrains.PhpStorm-aarch64.flatpak | |
- name: Build website with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: src/ | |
verbose: true | |
- name: Upload website artifact | |
uses: actions/upload-pages-artifact@v3 | |
- name: Deploy website to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |