From 43151932f86847c5a5fc7ee3f641d01ae2e5fa8b Mon Sep 17 00:00:00 2001 From: Basile Marchand Date: Wed, 27 Aug 2025 10:44:55 +0200 Subject: [PATCH 1/3] [ci] initial setup for github pages build and deploy --- .github/workflows/deploy.yml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2ac0e1e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,44 @@ +name: Deploy to GitHub Pages + +on: + # Trigger the workflow every time you push to the `main` branch + # Using a different branch name? Replace `main` with your branch’s name + push: + branches: + - main + - 'ci-*' + # Allows you to run this workflow manually from the Actions tab on GitHub. + workflow_dispatch: + +# Allow this job to clone the repo and create a page deployment +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout your repository using git + uses: actions/checkout@v4 + - name: Install, build, and upload your site + uses: withastro/action@v3 + # with: + # path: . # 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) + # env: + # PUBLIC_POKEAPI: 'https://pokeapi.co/api/v2' # Use single quotation marks for the variable value. (optional) + + deploy: + if: github.ref == 'refs/heads/main' + 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 \ No newline at end of file From a5f45d80bc0b3a2f4f08b32d9fe3c414c8629ee5 Mon Sep 17 00:00:00 2001 From: Basile Marchand Date: Wed, 27 Aug 2025 10:47:44 +0200 Subject: [PATCH 2/3] [deploy] update internal path --- astro.config.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/astro.config.mjs b/astro.config.mjs index a4cec09..245d60f 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,8 @@ import starlight from '@astrojs/starlight'; // https://astro.build/config export default defineConfig({ + site: 'https://simvia-tech.github.io', + base: '/code-aster-dockerhub', integrations: [ starlight({ title: 'code_aster docker catalog', From 3cc12d5de13e2480fa17fca5d927460f247fba30 Mon Sep 17 00:00:00 2001 From: Basile Marchand Date: Wed, 27 Aug 2025 10:52:40 +0200 Subject: [PATCH 3/3] update README.md to reflect project details and structure --- README.md | 78 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index fcd63ad..4f1f61b 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,64 @@ -# Starlight Starter Kit: Basics +# Code_Aster Documentation Site -[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) - -``` -npm create astro@latest -- --template starlight -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics) -[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics) -[![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) -[![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) - -> πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun! +This project is a documentation website for code_aster docker version, built with [Astro](https://astro.build/) and [Starlight](https://starlight.astro.build/). ## πŸš€ Project Structure -Inside of your Astro + Starlight project, you'll see the following folders and files: - ``` . -β”œβ”€β”€ public/ +β”œβ”€β”€ public/ # Static assets (e.g., favicon, global CSS) β”œβ”€β”€ src/ -β”‚ β”œβ”€β”€ assets/ +β”‚ β”œβ”€β”€ assets/ # Images and other media for docs β”‚ β”œβ”€β”€ content/ -β”‚ β”‚ └── docs/ -β”‚ └── content.config.ts -β”œβ”€β”€ astro.config.mjs -β”œβ”€β”€ package.json -└── tsconfig.json +β”‚ β”‚ └── docs/ # Documentation pages (.md, .mdx) +β”‚ └── content.config.ts # Content collections config +β”œβ”€β”€ astro.config.mjs # Astro configuration +β”œβ”€β”€ package.json # Project metadata and scripts +β”œβ”€β”€ tsconfig.json # TypeScript configuration +└── README.md # Project overview (this file) ``` -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. +- Documentation pages are located in [`src/content/docs/`](src/content/docs/). +- Images can be placed in [`src/assets/`](src/assets/). +- Static files (e.g., favicon) go in [`public/`](public/). + +## πŸ§‘β€πŸ’» Getting Started -Images can be added to `src/assets/` and embedded in Markdown with a relative link. +1. **Install dependencies:** + ```sh + npm install + ``` -Static assets, like favicons, can be placed in the `public/` directory. +2. **Start the development server:** + ```sh + npm run dev + ``` + The site will be available at [http://localhost:4321](http://localhost:4321). -## 🧞 Commands +3. **Build for production:** + ```sh + npm run build + ``` -All commands are run from the root of the project, from a terminal: +4. **Preview the production build:** + ```sh + npm run preview + ``` -| Command | Action | +## πŸ› οΈ Useful Commands + +| Command | Description | | :------------------------ | :----------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | +| `npm install` | Install dependencies | +| `npm run dev` | Start local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | +| `npm run preview` | Preview your build locally before deploying | +| `npm run astro ...` | Run Astro CLI commands (e.g., `astro add`) | | `npm run astro -- --help` | Get help using the Astro CLI | -## πŸ‘€ Want to learn more? +## πŸ“š Learn More + +- [Starlight Documentation](https://starlight.astro.build/) +- [Astro Documentation](https://docs.astro.build/) +- [Astro Discord Community](https://astro.build/chat) -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).