-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.13 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
name: Generar, testear y publicar
on:
push:
branches-ignore: [master]
pull_request:
branches-ignore: [master]
workflow_dispatch:
branches-ignore: [master]
jobs:
build-and-publish:
runs-on: ubuntu-20.04
steps:
- name: Obtener el proyecto
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Extract el nombre de la rama
uses: nelonoel/branch-name@v1
- name: Configurar Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Instalar dependencias
run: bundle install
- name: Generar la documentación
run: bundle exec rake build
- name: Testear
run: bundle exec rake tests
- name: Publicar
if: |
github.event != 'pull_request' || (
github.event.pull_request.types == 'closed' &&
github.event.pull_request.merged_by != ''
)
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: output/html
TARGET_FOLDER: ${{ env.BRANCH_NAME }}
CLEAN: true