Skip to content

Commit

Permalink
Merge pull request #2 from LaJaqueria/dev
Browse files Browse the repository at this point in the history
Primera version de la web con tests para el build
  • Loading branch information
crisconru authored Mar 25, 2024
2 parents 64dc5db + 6bbd167 commit 40cffcb
Showing 1 changed file with 65 additions and 13 deletions.
78 changes: 65 additions & 13 deletions .github/workflows/publicar.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,81 @@
name: ci
on:
push:
branches:
- master
- main
name: Publicar documentacion

on: push

permissions:
contents: write

jobs:
deploy:
test:
name: πŸ§ͺ Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials

- name: πŸ‘ Checkout
uses: actions/checkout@v4

- name: ❇️ Configurar Credenciales de Git
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
- name: ❇️ Preparar Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4

- name: ❇️ Preparar Python MkDocs Material
uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install-r requirements.txt
- run: mkdocs gh-deploy --force
- name: πŸ“₯ Instalar Dependencias
run: pip install -r requirements.txt

- name: πŸ› οΈ Build de la documentacion
working-directory: ./website
run: mkdocs build



despliegue:
name: πŸš€ Publicar
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:

- name: πŸ‘ Checkout
uses: actions/checkout@v4

- name: ❇️ Configurar Credenciales de Git
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: ❇️ Preparar Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV

- name: ❇️ Preparar Python MkDocs Material
uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: πŸ“₯ Instalar Dependencias
run: pip install -r requirements.txt

- name: πŸš€ Publicar documentacion
working-directory: ./website
run: mkdocs gh-deploy --force

0 comments on commit 40cffcb

Please sign in to comment.