Pleno: 2023-12-13:Asistencias y votaciones de la sesión del 13-12-202… #16426
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: publicacion-db | |
# Controls when the action will run. | |
on: | |
push: | |
branches: | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
etl: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: echo | |
run: | | |
echo ${{steps.set.outputs.today}} | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Build project with Maven | |
run: mvn -B clean compile | |
- uses: actions/setup-python@v1 | |
- name: publishes to datasette | |
uses: BSFishy/pip-action@v1 | |
with: | |
packages: | | |
datasette | |
sqlite-utils | |
csvs-to-sqlite | |
# - name: Install vercel plugin | |
# run: | | |
# datasette install datasette-publish-vercel | |
# Disabling to reduce the size of the image | |
- name: Prepare FTS | |
run: | | |
sqlite-utils enable-fts *.db votacion_resultado asunto etiquetas | |
sqlite-utils enable-fts *.db votacion_grupo_parlamentario asunto etiquetas | |
sqlite-utils enable-fts *.db votacion_congresista asunto etiquetas | |
- name: Prepare Plenos DB | |
run: | | |
csvs-to-sqlite data/2021-2026/plenos.csv 2021-2026-asistencias-votaciones.db | |
# - name: Deploy Datasette using Vercel | |
# env: | |
# VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
# run: |- | |
# datasette publish vercel *.db \ | |
# --token $VERCEL_TOKEN \ | |
# --project congreso-pleno-asistencia-votacion \ | |
# --install datasette-vega \ | |
# --install datasette-export-notebook \ | |
# --install datasette-copyable \ | |
# --install datasette-block-robots \ | |
# --install datasette-pretty-json | |
# - name: Create Pull Request | |
# uses: peter-evans/create-pull-request@v5 | |
# with: | |
# title: Cambios en Registro de Plenos | |
#- name: Set | |
# id: set-pr | |
# run: | | |
# echo "::set-output name=pr-title::$(cat pr-title.txt)" | |
# echo "::set-output name=pr-content::$(cat pr-content.txt)" | |
# echo "::set-output name=pr-branch::$(cat pr-branch.txt)" | |
#- name: Create Pull Request | |
# uses: peter-evans/create-pull-request@v3 | |
# with: | |
# title: ${{steps.set-pr.outputs.pr-title}} | |
# branch: ${{steps.set-pr.outputs.pr-branch}} | |
# body: ${{steps.set-pr.outputs.pr-content}} | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H-%M')" | |
- name: release | |
uses: actions/create-release@v1 | |
id: create_release | |
with: | |
draft: false | |
prerelease: false | |
release_name: Base de datos ${{ steps.date.outputs.date }} | |
tag_name: ${{ steps.date.outputs.date }} | |
body: Actualización de Base de Datos | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: upload DB | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: 2021-2026-asistencias-votaciones.db | |
asset_name: 2021-2026-asistencias-votaciones.db | |
asset_content_type: | |
application/octet-stream |