diff --git a/.github/workflows/docker-image-production.yml b/.github/workflows/docker-image-production.yml index 68d7ecc..13bbf0f 100644 --- a/.github/workflows/docker-image-production.yml +++ b/.github/workflows/docker-image-production.yml @@ -15,6 +15,16 @@ jobs: - name: check out the repo uses: actions/checkout@master + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22.x' + cache: 'npm' + cache-dependency-path: package-lock.json + + - name: Install dependencies + run: npm ci + - name: log in to docker hub uses: docker/login-action@v3 with: @@ -36,7 +46,9 @@ jobs: uses: docker/build-push-action@v6 with: file: ./Dockerfile - build-args: VUE_APP_API_URL=https://api.gendercomics.net/ + build-args: | + NODE_VERSION=22 + VUE_APP_API_URL=https://api.gendercomics.net/ push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/docker-image-stage.yml b/.github/workflows/docker-image-stage.yml index efc8e65..675dc50 100644 --- a/.github/workflows/docker-image-stage.yml +++ b/.github/workflows/docker-image-stage.yml @@ -9,13 +9,18 @@ jobs: name: push docker image to docker hub runs-on: ubuntu-latest steps: - - name: setup node + - name: check out the repo + uses: actions/checkout@master + + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version: '22.x' + cache: 'npm' + cache-dependency-path: package-lock.json - - name: check out the repo - uses: actions/checkout@master + - name: Install dependencies + run: npm ci - name: log in to docker hub uses: docker/login-action@v3 @@ -38,7 +43,9 @@ jobs: uses: docker/build-push-action@v6 with: file: ./Dockerfile - build-args: VUE_APP_API_URL=https://api-stage.gendercomics.net/ + build-args: | + NODE_VERSION=22 + VUE_APP_API_URL=https://api-stage.gendercomics.net/ push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/README.md b/README.md index f5db2a2..b295a2d 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,87 @@ -# Nuxt 3 Minimal Starter +# GenderComics Website -Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. +The official website for GenderComics, built with Nuxt 3. This project serves as the digital platform for the GenderComics initiative, providing information, resources, and content about gender representation in comics. -## Setup +## Features -Make sure to install the dependencies: +- 🚀 Built with Nuxt 3 for optimal performance +- 🌐 Multi-language support with i18n +- 📚 Content management with @nuxt/content +- 🖼️ Optimized image handling with @nuxt/image +- 🔒 Security features with nuxt-security +- 📊 Analytics integration with insights-js +- 🗃️ State management with Pinia + +## Prerequisites + +- Node.js (LTS version recommended) +- npm, pnpm, yarn, or bun package manager + +## Getting Started + +1. Clone the repository +2. Install dependencies: ```bash -# npm +# Using npm npm install -# pnpm +# Using pnpm pnpm install -# yarn +# Using yarn yarn install - -# bun -bun install ``` -## Development Server +## Development -Start the development server on `http://localhost:3000`: +Start the development server: ```bash -# npm -npm run dev +npm run dev-website +``` -# pnpm -pnpm run dev +The website will be available at `http://localhost:3000` -# yarn -yarn dev +## Building for Production -# bun -bun run dev -``` +To build the application for production: -## Production +```bash +npm run build-website +``` -Build the application for production: +To preview the production build locally: ```bash -# npm -npm run build +npm run preview-website +``` -# pnpm -pnpm run build +## Project Structure -# yarn -yarn build +- `content/` - Contains the website's content in markdown format +- `components/` - Vue components used throughout the application +- `pages/` - Application views and routes +- `public/` - Static assets +- `locales/` - Translation files for internationalization -# bun -bun run build -``` +## Contributing -Locally preview production build: +Please read our contributing guidelines before submitting pull requests. -```bash -# npm -npm run preview +## License -# pnpm -pnpm run preview +This project is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) license. -# yarn -yarn preview +This means you are free to: +- Share — copy and redistribute the material in any medium or format for any purpose, even commercially. -# bun -bun run preview -``` +Under the following terms: +- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. +- NoDerivatives — If you remix, transform, or build upon the material, you may not distribute the modified material. + +For more information, see the [full license text](https://creativecommons.org/licenses/by-nd/4.0/). + +## Contact -Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. +[Add contact information here] diff --git a/layouts/default.vue b/layouts/default.vue index 7825ad2..ed0b548 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -3,8 +3,16 @@ import { useFeatureStore } from '~/stores/features.ts' import { init, trackPages } from 'insights-js' const featureStore = useFeatureStore() -init('TrYgnSHvKAIkGdBl') -trackPages() +const { isDev } = useRuntimeConfig() + +if (!isDev) { + init('TrYgnSHvKAIkGdBl') + trackPages() +} + +onMounted(() => { + console.log('isDev', isDev) +})