mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-10-02 17:54:09 +10:00
* Update actions/checkout consistently to v7 * Update pnpm/action-setup to v6 With pnpm v11 this could and should be replaced with pnpm/setup, I guess. * Update actions/setup-node consistently to v7 * Update actions/configure-pages to v6 It looks like this should be non-critical, it mainly includes a runtime upgrade to Node 24 as far as I could see that. * Update actions/cache to v6 * Update docker/metadata-action to v6 I think this is also non-critical and mainly a runtime bump. * Update docker/login-action to v4 Should also be just the node version bump. * Update docker/setup-buildx-action to v4 * Update docker/setup-qemu-action to v4 * Update docker/build-push-action to v7 * Update actions/upload-artifact to v7 * Update actions/download-artifact to v8 This is quite a jump and I'm not very familiar with this action. But the changelogs looked more or less not critical, there was only a thing about downloading single artifacts by id in v5, but I think the "No Action Needed If" applies.
101 lines
3.0 KiB
YAML
101 lines
3.0 KiB
YAML
name: Deploy website to GitHub Pages
|
|
|
|
on:
|
|
# Runs on pushes targeting the default branch
|
|
push:
|
|
branches: [develop]
|
|
paths:
|
|
- "sites/promo/**"
|
|
- "sites/docs/**"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- "pnpm-workspace.yaml"
|
|
- ".github/workflows/pages.yml"
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
# 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 per the "pages" group, skipping runs queued
|
|
# between the in-progress run and the latest queued one. cancel-in-progress defaults
|
|
# to false, so in-flight production deployments are allowed to complete.
|
|
concurrency: "pages"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v6
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: "22"
|
|
cache: "pnpm"
|
|
|
|
# Only install the promo site (radiant) and docs site (docs-next) and their
|
|
# dependencies so the public website deploy stays decoupled from the
|
|
# server/desktop build pipelines.
|
|
- name: Install dependencies
|
|
run: pnpm install --filter radiant... --filter docs-next...
|
|
|
|
- name: Setup Pages
|
|
id: setup_pages
|
|
uses: actions/configure-pages@v6
|
|
|
|
- name: Restore cache
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
sites/promo/.next/cache
|
|
# Generate a new cache whenever packages or source files change.
|
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('sites/promo/**.[jt]s', 'sites/promo/**.[jt]sx') }}
|
|
# If source files changed but packages didn't, rebuild from a prior cache.
|
|
restore-keys: |
|
|
${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-
|
|
|
|
- name: Build promo site with Next.js
|
|
working-directory: sites/promo
|
|
run: pnpm run build
|
|
env:
|
|
PAGES_BASE_PATH: ${{ steps.setup_pages.outputs.base_path }}
|
|
|
|
- name: Build docs site with Astro
|
|
working-directory: sites/docs
|
|
run: pnpm run build
|
|
|
|
# Nest the Starlight docs (built with base: "/docs") inside the promo export
|
|
# so both ship from a single GitHub Pages deployment at /docs.
|
|
- name: Assemble docs into /docs
|
|
run: |
|
|
rm -rf sites/promo/out/docs
|
|
mkdir -p sites/promo/out/docs
|
|
cp -r sites/docs/dist/. sites/promo/out/docs/
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: sites/promo/out
|
|
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|