Skip to content

Commit

Permalink
ci: iterate on docs publishing (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssalbdivad authored Apr 28, 2024
1 parent 855550a commit 3bb30d8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches: [main]

defaults:
run:
shell: bash
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
update-gh-pages:
Expand All @@ -21,11 +23,23 @@ jobs:
- name: Setup repo
uses: ./.github/actions/setup

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Install, build, and upload your site
uses: withastro/action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ark/docs/out
path: ./ark/docs # The root location of your Astro project inside the repository. (optional)
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

deploy:
needs: update-gh-pages
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

create-release-pr:
runs-on: ubuntu-latest
Expand All @@ -44,7 +58,6 @@ jobs:
with:
commit: "chore: update versions"
title: "chore: update versions"
cwd: "./dev"
version: pnpm ci:version
publish: pnpm ci:publish
env:
Expand Down
4 changes: 2 additions & 2 deletions ark/docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { defineConfig } from "astro/config"

// https://astro.build/config
export default defineConfig({
site: "https://arktype.io",
outDir: "out",
integrations: [
starlight({
Expand Down Expand Up @@ -35,6 +36,5 @@ export default defineConfig({
]
}),
react()
],
site: "https://arktype.io"
]
})
1 change: 1 addition & 0 deletions ark/docs/public/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
arktype.io

0 comments on commit 3bb30d8

Please sign in to comment.