Skip to content

Commit b85f7bf

Browse files
Merge pull request #1 from simvia-tech/ci-setup
Initial github actions for build + deploy
2 parents 7113cc5 + 3cc12d5 commit b85f7bf

File tree

3 files changed

+90
-34
lines changed

3 files changed

+90
-34
lines changed

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches:
8+
- main
9+
- 'ci-*'
10+
# Allows you to run this workflow manually from the Actions tab on GitHub.
11+
workflow_dispatch:
12+
13+
# Allow this job to clone the repo and create a page deployment
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout your repository using git
24+
uses: actions/checkout@v4
25+
- name: Install, build, and upload your site
26+
uses: withastro/action@v3
27+
# with:
28+
# path: . # The root location of your Astro project inside the repository. (optional)
29+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
30+
# 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)
31+
# env:
32+
# PUBLIC_POKEAPI: 'https://pokeapi.co/api/v2' # Use single quotation marks for the variable value. (optional)
33+
34+
deploy:
35+
if: github.ref == 'refs/heads/main'
36+
needs: build
37+
runs-on: ubuntu-latest
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

README.md

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,64 @@
1-
# Starlight Starter Kit: Basics
1+
# Code_Aster Documentation Site
22

3-
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
4-
5-
```
6-
npm create astro@latest -- --template starlight
7-
```
8-
9-
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
10-
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
11-
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
12-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)
13-
14-
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
3+
This project is a documentation website for code_aster docker version, built with [Astro](https://astro.build/) and [Starlight](https://starlight.astro.build/).
154

165
## 🚀 Project Structure
176

18-
Inside of your Astro + Starlight project, you'll see the following folders and files:
19-
207
```
218
.
22-
├── public/
9+
├── public/ # Static assets (e.g., favicon, global CSS)
2310
├── src/
24-
│ ├── assets/
11+
│ ├── assets/ # Images and other media for docs
2512
│ ├── content/
26-
│ │ └── docs/
27-
│ └── content.config.ts
28-
├── astro.config.mjs
29-
├── package.json
30-
└── tsconfig.json
13+
│ │ └── docs/ # Documentation pages (.md, .mdx)
14+
│ └── content.config.ts # Content collections config
15+
├── astro.config.mjs # Astro configuration
16+
├── package.json # Project metadata and scripts
17+
├── tsconfig.json # TypeScript configuration
18+
└── README.md # Project overview (this file)
3119
```
3220

33-
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
21+
- Documentation pages are located in [`src/content/docs/`](src/content/docs/).
22+
- Images can be placed in [`src/assets/`](src/assets/).
23+
- Static files (e.g., favicon) go in [`public/`](public/).
24+
25+
## 🧑‍💻 Getting Started
3426

35-
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
27+
1. **Install dependencies:**
28+
```sh
29+
npm install
30+
```
3631

37-
Static assets, like favicons, can be placed in the `public/` directory.
32+
2. **Start the development server:**
33+
```sh
34+
npm run dev
35+
```
36+
The site will be available at [http://localhost:4321](http://localhost:4321).
3837

39-
## 🧞 Commands
38+
3. **Build for production:**
39+
```sh
40+
npm run build
41+
```
4042

41-
All commands are run from the root of the project, from a terminal:
43+
4. **Preview the production build:**
44+
```sh
45+
npm run preview
46+
```
4247

43-
| Command | Action |
48+
## 🛠️ Useful Commands
49+
50+
| Command | Description |
4451
| :------------------------ | :----------------------------------------------- |
45-
| `npm install` | Installs dependencies |
46-
| `npm run dev` | Starts local dev server at `localhost:4321` |
52+
| `npm install` | Install dependencies |
53+
| `npm run dev` | Start local dev server at `localhost:4321` |
4754
| `npm run build` | Build your production site to `./dist/` |
48-
| `npm run preview` | Preview your build locally, before deploying |
49-
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
55+
| `npm run preview` | Preview your build locally before deploying |
56+
| `npm run astro ...` | Run Astro CLI commands (e.g., `astro add`) |
5057
| `npm run astro -- --help` | Get help using the Astro CLI |
5158

52-
## 👀 Want to learn more?
59+
## 📚 Learn More
60+
61+
- [Starlight Documentation](https://starlight.astro.build/)
62+
- [Astro Documentation](https://docs.astro.build/)
63+
- [Astro Discord Community](https://astro.build/chat)
5364

54-
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).

astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import starlight from '@astrojs/starlight';
44

55
// https://astro.build/config
66
export default defineConfig({
7+
site: 'https://simvia-tech.github.io',
8+
base: '/code-aster-dockerhub',
79
integrations: [
810
starlight({
911
title: 'code_aster docker catalog',

0 commit comments

Comments
 (0)