Skip to content

Commit

Permalink
Merge branch 'main' into i18n-pt-br/guides/media-cloudinary
Browse files Browse the repository at this point in the history
  • Loading branch information
yanthomasdev authored Aug 29, 2024
2 parents 27bf299 + 80de369 commit eae2973
Show file tree
Hide file tree
Showing 42 changed files with 1,274 additions and 361 deletions.
52 changes: 46 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,92 @@ jobs:
name: Generate Reference Docs
if: github.repository_owner == 'withastro'
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Default options for running with latest Astro code
- SOURCE_BRANCH: main
TARGET_BRANCH: main
LABEL: ci
PR_BRANCH: ci/docgen
PR_TITLE: 'ci: update reference docs'
# Custom options for running with Astro v5 beta code
- SOURCE_BRANCH: next
TARGET_BRANCH: 5.0.0-beta
LABEL: 5.0.0-beta,ci
PR_BRANCH: ci/docgen-beta
PR_TITLE: '[BETA] ci: update reference docs'
steps:
- name: Check out code using Git
uses: actions/checkout@v4
with:
ref: ${{ matrix.TARGET_BRANCH }}

- name: Install Tools & Dependencies
uses: ./.github/actions/install

- name: Run docgen script
run: pnpm run docgen
env:
SOURCE_BRANCH: ${{ matrix.SOURCE_BRANCH }}

- name: Create Pull Request
id: createpr
uses: peter-evans/create-pull-request@v3
with:
branch: ci/docgen
branch: ${{ matrix.PR_BRANCH }}
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
add-paths: src/content/docs/en/reference/*.mdx
commit-message: 'ci: update reference docs'
title: 'ci: update reference docs'
title: ${{ matrix.PR_TITLE }}
body: |
This PR is auto-generated by a nightly GitHub action to update the reference docs from source code in withastro/astro.
labels: ci
labels: ${{ matrix.LABEL }}
base: ${{ matrix.TARGET_BRANCH }}

error:
name: Generate Error Reference Docs
if: github.repository_owner == 'withastro'
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Default options for running with latest Astro code
- SOURCE_BRANCH: main
TARGET_BRANCH: main
LABEL: ci
PR_BRANCH: ci/docgen-errors
PR_TITLE: 'ci: update error reference docs'
# Custom options for running with Astro v5 beta code
- SOURCE_BRANCH: next
TARGET_BRANCH: 5.0.0-beta
LABEL: 5.0.0-beta,ci
PR_BRANCH: ci/docgen-errors-beta
PR_TITLE: '[BETA] ci: update error reference docs'
steps:
- name: Check out code using Git
uses: actions/checkout@v4
with:
ref: ${{ matrix.TARGET_BRANCH }}

- name: Install Tools & Dependencies
uses: ./.github/actions/install

- name: Run docgen script
run: pnpm run docgen:errors
env:
SOURCE_BRANCH: ${{ matrix.SOURCE_BRANCH }}

- name: Create Pull Request
id: createpr
uses: peter-evans/create-pull-request@v3
with:
branch: ci/docgen-errors
branch: ${{ matrix.PR_BRANCH }}
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
add-paths: src/content/docs/en/reference/*.mdx
commit-message: 'ci: update error reference docs'
title: 'ci: update error reference docs'
title: ${{ matrix.PR_TITLE }}
body: |
This PR is auto-generated by a nightly GitHub action to update the error reference docs from source code in withastro/astro.
labels: ci
labels: ${{ matrix.LABEL }}
base: ${{ matrix.TARGET_BRANCH }}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@
"src/content/docs/en/reference/errors/*": true,
"src/content/docs/en/reference/configuration-reference.mdx": true,
"src/content/docs/en/reference/error-reference.mdx": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
4 changes: 4 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import starlight from '@astrojs/starlight';
import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-sections';
import { defineConfig, sharpImageService } from 'astro/config';
import { makeLocalesConfig } from './config/locales';
import { makeSidebar } from './config/sidebar';
Expand All @@ -23,6 +24,9 @@ export default defineConfig({
starlight({
title: 'Docs',
customCss: ['./src/styles/custom.css'],
expressiveCode: {
plugins: [pluginCollapsibleSections()],
},
components: {
EditLink: './src/components/starlight/EditLink.astro',
Head: './src/components/starlight/Head.astro',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"@astrojs/sitemap": "^3.1.5",
"@astrojs/starlight": "^0.26.1",
"@docsearch/js": "^3.5.2",
"@expressive-code/plugin-collapsible-sections": "^0.35.0",
"@fontsource/ibm-plex-mono": "^4.5.10",
"@lunariajs/core": "^0.1.1",
"canvas-confetti": "^1.6.0",
Expand Down
Loading

0 comments on commit eae2973

Please sign in to comment.