Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
group: vercel-production
cancel-in-progress: true

jobs:
build:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20
environment:
name: production
url: https://gosqlx.dev

steps:
- uses: actions/checkout@v4

Expand All @@ -44,24 +46,26 @@ jobs:
cache: 'npm'
cache-dependency-path: website/package-lock.json

- name: Install and build website
run: |
cd website
npm ci
npm run build
- name: Install Vercel CLI
run: npm install -g vercel@latest

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/dist
- name: Pull Vercel environment
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
working-directory: website
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Build with Vercel
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
working-directory: website
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

- name: Deploy to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
working-directory: website
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
1 change: 1 addition & 0 deletions website/public/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gosqlx.dev
Loading