-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (57 loc) · 1.98 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Publicar
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build-and-publish:
runs-on: ubuntu-20.04
steps:
- name: Obtener el proyecto
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Obtener el nombre de la rama
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Configurar Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Instalar dependencias (nativas)
run: |
sudo apt-get update -y -qq
sudo apt-get install pkg-config libxml2-dev libxslt-dev
# asciidoctor-mathematical
sudo apt-get install bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev fonts-lyx cmake
- name: Instalar dependencias (gemas)
run: |
bundle config set --local path vendor/bundle
bundle config set --local build.nokogiri --use-system-libraries
bundle config set --local without epub3
bundle config set --local deployment true
bundle install
- name: Generar la documentación
run: bundle exec rake build:site build:pdf DOCUMENT_NAME=sistemas_operativos
- name: Publicar web
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: output/html
TARGET_FOLDER: ${{ steps.branch_name.outputs.SOURCE_NAME }}
CLEAN: true
- name: Publicar el PDF en 'Releases'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: output/pdf/*.pdf
tag: ${{ github.ref }}
file_glob: true
release_name: "Curso 20XX-20XY"
body: "Apuntes de sistemas operativos del curso 20XX-20XY."
overwrite: true