Skip to content

Commit

Permalink
chore: actualización de la raíz de github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jesustorresdev committed Jul 19, 2023
1 parent ee1c510 commit 85c080b
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,38 @@ jobs:
- name: Generar la documentación
run: bundle exec rake build:www[$SITE_ROOT] build:pdf DOCUMENT_NAME=sistemas_operativos

- name: Publicar web
- name: Publicar el sitio web
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: output/www
target-folder: ${{ steps.branch_name.outputs.SOURCE_NAME }}
clean: true

- name: Generar archivos para actualizar la raíz del sitio web
if: ${{ steps.branch_name.outputs.SOURCE_NAME == vars.CURRENT_BRANCH }}
run: |
mkdir -p ${{ runner.temp }}/html
cp output/www/sitemap.xml ${{ runner.temp }}/html
cat << EOF > ${{ runner.temp }}/html/index.html
<!DOCTYPE HTML>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0;url=https://ull-esit-sistemas-operativos.github.io/ssoo-apuntes/${{ steps.branch_name.outputs.SOURCE_NAME }}/">
<link rel="canonical" href="https://ull-esit-sistemas-operativos.github.io/ssoo-apuntes/${{ steps.branch_name.outputs.SOURCE_NAME }}/">
</head>
</html>
EOF
- name: Actualizar la raíz del sitio web
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ steps.branch_name.outputs.SOURCE_NAME == vars.CURRENT_BRANCH }}
with:
branch: gh-pages
folder: ${{ runner.temp }}/html
clean: false

- name: Publicar el PDF en 'Releases'
uses: svenstaro/upload-release-action@v2
with:
Expand Down

0 comments on commit 85c080b

Please sign in to comment.