diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 787454f..f881d2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,7 +50,7 @@ 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 @@ -58,6 +58,30 @@ jobs: 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 + + + + + + + + + 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: