-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy
- Loading branch information
0 parents
commit 2cb6ff6
Showing
40 changed files
with
5,228 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Deployment | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
merge_group: | ||
pull_request: | ||
branches: [main] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Automatically cancel in-progress actions on the same branch | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
REGISTRY: docker.io | ||
IMAGE_NAME: trueberryless/starlight-plugins-docs-components | ||
NODE_VERSION: 20 | ||
|
||
jobs: | ||
deployment: | ||
if: contains(github.event.head_commit.message, 'deploy') || github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create tag | ||
run: echo "IMAGE_TAG=$(echo $GITHUB_REF_NAME-$GITHUB_SHA)" >> $GITHUB_ENV | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
package_json_file: ./docs/package.json | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
cache-dependency-path: ./pnpm-lock.yaml | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
shell: bash | ||
working-directory: ./docs | ||
|
||
- name: Build Mutanuq Website | ||
run: pnpm run build | ||
shell: bash | ||
working-directory: ./docs | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: | | ||
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | ||
${{ env.IMAGE_NAME }}:latest | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Update deployment.yaml file | ||
run: | | ||
yq eval '.spec.template.spec.containers[0].image = "${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}"' -i manifest/deployment.yaml | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: update deployment.json container image (automated) | ||
|
||
- uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ env.IMAGE_TAG }} | ||
makeLatest: true | ||
body: "A docker image has been deployed to [Docker Hub](https://hub.docker.com/r/${{ env.IMAGE_NAME }}/tags)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# build output | ||
dist/ | ||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"cwd": "${workspaceFolder}/docs", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024-present, trueberryless-org | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# `@trueberryless-org/starlight-plugins-docs-components` | ||
|
||
Set of opinionated Starlight components used in trueberryless-org's Starlight plugins documentations | ||
|
||
## Package | ||
|
||
If you are looking for the Starlight plugin package, you can find it in the [`packages/starlight-plugins-docs-components/`](/packages/starlight-plugins-docs-components/) directory. | ||
|
||
## Project structure | ||
|
||
This project uses pnpm workspaces to develop a single Starlight plugin from the `packages/starlight-plugins-docs-components/` directory. A Starlight documentation site is also available in the `docs/` directory that is also used for testing and demonstrating the Starlight plugin. | ||
|
||
## License | ||
|
||
Licensed under the MIT License, Copyright © trueberryless-org. | ||
|
||
See [LICENSE](/LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# `@trueberryless-org/starlight-plugins-docs-components` | ||
|
||
Set of opinionated Starlight components used in trueberryless-org's Starlight plugins documentations | ||
|
||
## Documentation | ||
|
||
Run the documentation locally by running the following command in your terminal: | ||
|
||
```shell | ||
pnpm run dev | ||
``` | ||
|
||
Content can be found in the [`src/content/docs/`](./src/content/docs/) directory. | ||
|
||
## License | ||
|
||
Licensed under the MIT License, Copyright © trueberryless-org. | ||
|
||
See [LICENSE](/LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import starlight from "@astrojs/starlight"; | ||
import { defineConfig } from "astro/config"; | ||
import starlightLinksValidator from "starlight-links-validator"; | ||
|
||
export default defineConfig({ | ||
integrations: [ | ||
starlight({ | ||
editLink: { | ||
baseUrl: | ||
"https://github.com/trueberryless-org/starlight-plugins-docs-components/edit/main/docs/", | ||
}, | ||
customCss: ["./src/styles/custom.css"], | ||
plugins: [starlightLinksValidator()], | ||
sidebar: [ | ||
{ | ||
label: "Start Here", | ||
items: [{ slug: "getting-started" }], | ||
}, | ||
{ | ||
label: "Showcase", | ||
autogenerate: { directory: "showcase" }, | ||
}, | ||
], | ||
social: { | ||
github: "https://github.com/trueberryless-org/starlight-plugins-docs-components", | ||
}, | ||
title: "Starlight Plugins Docs Components", | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "@trueberryless-org/starlight-plugins-docs-components-docs", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"description": "Set of opinionated Starlight components used in trueberryless-org's Starlight plugins documentations", | ||
"author": "trueberryless-org", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"astro": "astro" | ||
}, | ||
"dependencies": { | ||
"@astrojs/starlight": "^0.28.5", | ||
"@trueberryless-org/starlight-plugins-docs-components": "workspace:*", | ||
"astro": "^4.16.8", | ||
"sharp": "^0.33.5", | ||
"starlight-links-validator": "^0.13.0" | ||
}, | ||
"engines": { | ||
"node": "^18.17.1 || ^20.3.0 || >=21.0.0" | ||
}, | ||
"private": true, | ||
"homepage": "https://github.com/trueberryless-org/starlight-plugins-docs-components", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/trueberryless-org/starlight-plugins-docs-components.git", | ||
"directory": "docs" | ||
}, | ||
"bugs": "https://github.com/trueberryless-org/starlight-plugins-docs-components/issues" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { defineCollection } from 'astro:content' | ||
import { docsSchema } from '@astrojs/starlight/schema' | ||
|
||
export const collections = { | ||
docs: defineCollection({ schema: docsSchema() }), | ||
} |
Oops, something went wrong.