Skip to content

Commit

Permalink
Only validate parameter. Stop deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello committed Nov 19, 2024
1 parent ba13806 commit c319ab3
Showing 1 changed file with 68 additions and 68 deletions.
136 changes: 68 additions & 68 deletions .github/workflows/tax-benefit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,82 +12,82 @@ jobs:
secrets:
token: ${{ secrets.CONTROL_CENTER_TOKEN }}

deploy_parameters:
runs-on: ubuntu-latest
# deploy_parameters:
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Clone Legislation Parameters Explorer
run: git clone https://git.leximpact.dev/leximpact/legislation-parameters-explorer.git
- name: Install Node.js version LTS
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install viewer dependencies
run: npm install
working-directory: legislation-parameters-explorer/packages/viewer
- name: Configure viewer
run: |
rm -f .env
cat > .env << EOF
# Customizations to apply to the site (theme, URLs…)
CUSTOMIZATION="openfisca"
# steps:
# - uses: actions/checkout@v4
# - name: Clone Legislation Parameters Explorer
# run: git clone https://git.leximpact.dev/leximpact/legislation-parameters-explorer.git
# - name: Install Node.js version LTS
# uses: actions/setup-node@v4
# with:
# node-version: 'lts/*'
# - name: Install viewer dependencies
# run: npm install
# working-directory: legislation-parameters-explorer/packages/viewer
# - name: Configure viewer
# run: |
# rm -f .env
# cat > .env << EOF
# # Customizations to apply to the site (theme, URLs…)
# CUSTOMIZATION="openfisca"

DBNOMICS_DATASET_CODE="openfisca_tunisia_pension"
DBNOMICS_PROVIDER_CODE="OpenFisca"
DBNOMICS_URL="https://db.nomics.world/"
# DBNOMICS_DATASET_CODE="openfisca_tunisia_pension"
# DBNOMICS_PROVIDER_CODE="OpenFisca"
# DBNOMICS_URL="https://db.nomics.world/"

EDITOR_URL="https://editor.parameters.tn.tax-benefit.org/"
# EDITOR_URL="https://editor.parameters.tn.tax-benefit.org/"

EXPORT_CSV=true
EXPORT_JSON=false
EXPORT_XLSX=true
# EXPORT_CSV=true
# EXPORT_JSON=false
# EXPORT_XLSX=true

# Path of directory containing legislation parameters of country
PARAMETERS_DIR="../../../openfisca_tunisia_pension/parameters/"
# # Path of directory containing legislation parameters of country
# PARAMETERS_DIR="../../../openfisca_tunisia_pension/parameters/"

# Description of parameters remote repository
PARAMETERS_AUTHOR_EMAIL="[email protected]"
PARAMETERS_AUTHOR_NAME="Éditeur des paramètres d'OpenFisca-Tunisia-Pension"
PARAMETERS_BRANCH="main"
PARAMETERS_FORGE_DOMAIN_NAME="github.com"
PARAMETERS_FORGE_TYPE="GitHub"
PARAMETERS_GROUP="openfisca"
PARAMETERS_PROJECT="openfisca-tunisia-pension"
PARAMETERS_PROJECT_DIR="openfisca_tunisia_pension/parameters"
# # Description of parameters remote repository
# PARAMETERS_AUTHOR_EMAIL="[email protected]"
# PARAMETERS_AUTHOR_NAME="Éditeur des paramètres d'OpenFisca-Tunisia-Pension"
# PARAMETERS_BRANCH="main"
# PARAMETERS_FORGE_DOMAIN_NAME="github.com"
# PARAMETERS_FORGE_TYPE="GitHub"
# PARAMETERS_GROUP="openfisca"
# PARAMETERS_PROJECT="openfisca-tunisia-pension"
# PARAMETERS_PROJECT_DIR="openfisca_tunisia_pension/parameters"

SHOW_LAST_BREADCRUMB_ITEM = false
# SHOW_LAST_BREADCRUMB_ITEM = false

TABLE_OF_CONTENTS_DIR="../../../openfisca_tunisia_pension/tables/"
# TABLE_OF_CONTENTS_DIR="../../../openfisca_tunisia_pension/tables/"

TITLE="OpenFisca-Tunisia-Pension - الجباية المفتوحة تونس"
# TITLE="OpenFisca-Tunisia-Pension - الجباية المفتوحة تونس"

# Path of file containing units used by French legislation parameters
UNITS_FILE_PATH="../../../openfisca_tunisia_pension/units.yaml"
EOF
working-directory: legislation-parameters-explorer/packages/viewer
- name: Initialize .svelte-kit directory of viewer
run: npx svelte-kit sync
working-directory: legislation-parameters-explorer/packages/viewer
- name: Generate data of viewer
run: npx tsx src/scripts/generate_data.ts
working-directory: legislation-parameters-explorer/packages/viewer
- name: Build viewer
run: npm run build
working-directory: legislation-parameters-explorer/packages/viewer
- name: Configure ssh for deployment to server
uses: tanmancan/[email protected]
with:
ssh-auth-sock: /tmp/my_auth.sock
ssh-private-key: ${{ secrets.PARAMETERS_EXPLORER_SSH_PRIVATE_KEY }}
ssh-public-key: ${{ secrets.PARAMETERS_EXPLORER_SSH_KNOWN_HOSTS }}
- name: Deploy to Server using rsync
run: rsync -az --delete -e "ssh -J [email protected]:2222" build/ [email protected]:public_html/
working-directory: legislation-parameters-explorer/packages/viewer
# # Path of file containing units used by French legislation parameters
# UNITS_FILE_PATH="../../../openfisca_tunisia_pension/units.yaml"
# EOF
# working-directory: legislation-parameters-explorer/packages/viewer
# - name: Initialize .svelte-kit directory of viewer
# run: npx svelte-kit sync
# working-directory: legislation-parameters-explorer/packages/viewer
# - name: Generate data of viewer
# run: npx tsx src/scripts/generate_data.ts
# working-directory: legislation-parameters-explorer/packages/viewer
# - name: Build viewer
# run: npm run build
# working-directory: legislation-parameters-explorer/packages/viewer
# - name: Configure ssh for deployment to server
# uses: tanmancan/[email protected]
# with:
# ssh-auth-sock: /tmp/my_auth.sock
# ssh-private-key: ${{ secrets.PARAMETERS_EXPLORER_SSH_PRIVATE_KEY }}
# ssh-public-key: ${{ secrets.PARAMETERS_EXPLORER_SSH_KNOWN_HOSTS }}
# - name: Deploy to Server using rsync
# run: rsync -az --delete -e "ssh -J [email protected]:2222" build/ [email protected]:public_html/
# working-directory: legislation-parameters-explorer/packages/viewer

deploy_simulator:
uses: tax-benefit/actions/.github/workflows/[email protected]
with:
python_package: "openfisca_tunisia_pension"
secrets:
token: ${{ secrets.CONTROL_CENTER_TOKEN }}
# deploy_simulator:
# uses: tax-benefit/actions/.github/workflows/[email protected]
# with:
# python_package: "openfisca_tunisia_pension"
# secrets:
# token: ${{ secrets.CONTROL_CENTER_TOKEN }}

0 comments on commit c319ab3

Please sign in to comment.