Skip to content

Commit 9ad7d1c

Browse files
committed
Merge remote-tracking branch 'github/main' into land/b-107-108
2 parents 79ea533 + 1152a70 commit 9ad7d1c

3 files changed

Lines changed: 41 additions & 4 deletions

File tree

‎.github/workflows/website.yml‎

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
name: Website
22

3-
# Builds the playground engine and the site, and checks them. It runs on pull requests that touch
4-
# them and on demand, never on push to main, and it never deploys: the site is not public yet.
5-
# Add a deploy job only once publishing is approved.
3+
# Builds the playground engine and the site, checks them, and deploys sqlquack.io to GitHub Pages
4+
# from main. While the repository is private, only pull requests and manual runs build, and nothing
5+
# deploys. The site goes live from the `public` event when the repository is made public, or from a
6+
# manual run on main once Pages is enabled.
67
on:
8+
public:
9+
push:
10+
branches: [main]
11+
paths:
12+
- website/**
13+
- crates/sqlquack-core/**
14+
- crates/sqlquack-duckdb/**
15+
- crates/sqlquack-rules/**
16+
- crates/sqlquack-semantics/**
17+
- crates/sqlquack-snowflake/**
18+
- crates/sqlquack-syntax/**
19+
- .github/workflows/website.yml
720
pull_request:
821
paths:
922
- website/**
@@ -26,6 +39,7 @@ concurrency:
2639
jobs:
2740
build:
2841
name: Build the engine and the website
42+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || !github.event.repository.private
2943
runs-on: ubuntu-24.04
3044
defaults:
3145
run:
@@ -76,3 +90,25 @@ jobs:
7690

7791
- name: Check links
7892
run: python3 scripts/check_links.py dist
93+
94+
- name: Upload site
95+
if: github.event_name != 'pull_request'
96+
uses: actions/upload-pages-artifact@v3
97+
with:
98+
path: website/dist
99+
100+
deploy:
101+
name: Deploy to GitHub Pages
102+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && !github.event.repository.private
103+
needs: build
104+
runs-on: ubuntu-24.04
105+
permissions:
106+
pages: write
107+
id-token: write
108+
environment:
109+
name: github-pages
110+
url: ${{ steps.deployment.outputs.page_url }}
111+
steps:
112+
- name: Deploy
113+
id: deployment
114+
uses: actions/deploy-pages@v4

‎website/public/CNAME‎

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

‎website/public/_headers‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Response headers for hosts that read a _headers file, such as Cloudflare Pages and Netlify. Both
22
# compress with Brotli on their own, .wasm included, so no encoding is set here. GitHub Pages, which
3-
# the SQLClean and SQLBuild sites use, ignores this file: it serves gzip with a 10-minute cache.
3+
# serves sqlquack.io, ignores this file: it serves gzip with a 10-minute cache.
44

55
# Content-hashed by Astro: a changed file gets a new name.
66
/_astro/*

0 commit comments

Comments
 (0)