2023-06-08 15:39:07 +00:00
|
|
|
# Deploy installation manifests and shields versions
|
|
|
|
name: Deploy Installation Data
|
2023-05-28 03:36:32 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- devel
|
|
|
|
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
|
|
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
|
|
concurrency:
|
|
|
|
group: "pages"
|
|
|
|
cancel-in-progress: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Single deploy job since we're just deploying
|
|
|
|
deploy:
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup Pages
|
2024-08-26 13:52:47 +00:00
|
|
|
uses: actions/configure-pages@v5
|
2023-05-28 03:36:32 +00:00
|
|
|
- name: Setup Python
|
2024-08-26 13:52:47 +00:00
|
|
|
uses: actions/setup-python@v5
|
2024-08-26 13:55:13 +00:00
|
|
|
with:
|
|
|
|
python-version: '3.10'
|
2023-06-07 19:05:36 +00:00
|
|
|
# Generate manifest + shields files for main branch
|
|
|
|
- name: Checkout main
|
2023-06-07 19:28:49 +00:00
|
|
|
id: checkout-main
|
2024-08-26 13:52:47 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-06-07 19:05:36 +00:00
|
|
|
with:
|
|
|
|
ref: 'main'
|
2023-06-07 20:04:39 +00:00
|
|
|
clean: false
|
|
|
|
- name: Create outputs folders
|
2023-06-07 20:07:12 +00:00
|
|
|
if: success() || failure()
|
2023-06-07 20:04:39 +00:00
|
|
|
shell: bash
|
2024-02-20 01:40:05 +00:00
|
|
|
run: mkdir deploy; mkdir deploy/manifests; mkdir deploy/manifests/main deploy/manifests/devel
|
2023-05-31 15:19:32 +00:00
|
|
|
- name: Generate manifest and shields for main branch
|
2023-06-07 19:28:49 +00:00
|
|
|
id: manifest-main
|
2023-06-07 20:07:12 +00:00
|
|
|
if: ${{ (success() || failure()) && steps.checkout-main.outcome == 'success' }}
|
2024-07-06 04:55:03 +00:00
|
|
|
run: python build/imgen.py shields
|
2023-06-07 19:05:36 +00:00
|
|
|
- name: Save main's manifest
|
2023-06-07 20:07:12 +00:00
|
|
|
if: ${{ (success() || failure()) && steps.manifest-main.outcome == 'success' }}
|
2023-06-07 19:05:36 +00:00
|
|
|
run: mv install_manifest.json deploy/manifests/main
|
|
|
|
# Generate manifest for devel branch
|
|
|
|
- name: Checkout devel
|
2023-06-07 19:28:49 +00:00
|
|
|
id: checkout-devel
|
2023-06-07 19:11:42 +00:00
|
|
|
if: success() || failure()
|
2024-08-26 13:52:47 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-06-07 19:05:36 +00:00
|
|
|
with:
|
|
|
|
ref: 'devel'
|
2023-06-07 20:04:39 +00:00
|
|
|
clean: false
|
2023-06-07 19:05:36 +00:00
|
|
|
- name: Generate manifest for devel
|
2023-06-07 19:28:49 +00:00
|
|
|
id: manifest-devel
|
2023-06-07 19:57:07 +00:00
|
|
|
if: ${{ (success() || failure()) && steps.checkout-devel.outcome == 'success' }}
|
2024-06-30 16:36:22 +00:00
|
|
|
run: python build/imgen.py
|
2023-06-07 19:05:36 +00:00
|
|
|
- name: Save devel's manifest
|
2023-06-07 19:57:07 +00:00
|
|
|
if: ${{ (success() || failure()) && steps.manifest-devel.outcome == 'success' }}
|
2023-06-07 19:05:36 +00:00
|
|
|
run: mv install_manifest.json deploy/manifests/devel
|
|
|
|
# All artifacts ready now, upload deploy directory
|
2023-05-31 15:15:55 +00:00
|
|
|
- name: Upload artifacts
|
2023-06-07 20:07:12 +00:00
|
|
|
id: upload-artifacts
|
|
|
|
if: ${{ (success() || failure()) && (steps.manifest-main.outcome == 'success' || steps.manifest-latest.outcome == 'success' || steps.manifest-devel.outcome == 'success') }}
|
2024-08-26 13:52:47 +00:00
|
|
|
uses: actions/upload-pages-artifact@v3
|
2023-05-28 03:36:32 +00:00
|
|
|
with:
|
|
|
|
# Upload manifest JSON
|
2023-05-31 15:15:55 +00:00
|
|
|
path: 'deploy/'
|
2023-05-28 03:36:32 +00:00
|
|
|
- name: Deploy to GitHub Pages
|
2023-06-07 20:07:12 +00:00
|
|
|
if: ${{ (success() || failure()) && steps.upload-artifacts.outcome == 'success' }}
|
2023-05-28 03:36:32 +00:00
|
|
|
id: deployment
|
2024-08-26 13:52:47 +00:00
|
|
|
uses: actions/deploy-pages@v4
|