Skip to content

Commit

Permalink
Added editor config and workflow to deploy in github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
bsperezb committed Oct 19, 2024
1 parent a1741e6 commit fb54680
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Archivo .editorconfig para el proyecto de Astro

# Aplicar estas configuraciones a todos los archivos
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

# Configuración para archivos JSON, YAML, y Markdown
[*.{json,yaml,yml,md}]
indent_size = 2

# Configuración para archivos HTML, CSS, JavaScript, y Astro
[*.{html,css,js,ts,astro}]
indent_size = 2

# Configuración para archivos de configuración
[*.{env,editorconfig}]
indent_size = 2

# Configuración para archivos de texto y markdown
[*.md]
max_line_length = off
trim_trailing_whitespace = false

# Incluir archivos simbólicos
[*.syml]
indent_style = space
indent_size = 2
30 changes: 30 additions & 0 deletions .github/workflows/ghDeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '22.3'

- name: Install dependencies
run: npm install

- name: Build the project
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist
4 changes: 3 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ import tailwind from '@astrojs/tailwind';

// https://astro.build/config
export default defineConfig({
integrations: [tailwind()]
integrations: [tailwind()],
base: '/Astro-Books/',
output: 'static'
});

0 comments on commit fb54680

Please sign in to comment.