Skip to content

fix key value in settings step #40

fix key value in settings step

fix key value in settings step #40

Workflow file for this run

name: Deploy Mina Names
on:
push:
branches:
- deploy-pipeline
# workflow_dispatch:
# inputs:
# environment:
# type: choice
# options:
# - main
# - t-names
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Checkout GitHub Actions
# uses: actions/checkout@v3
# with:
# repository: Staketab/github-actions
# path: .github/actions
# token: ${{ secrets.GH_TOKEN }}
# - name: calculate environment
# run: |
# pull_request_branch=${{ github.base_ref }}
# dispatch_branch=${{ github.event.inputs.environment }}
# echo "ENVIRONMENT=${pull_request_branch:-$dispatch_branch}" >> $GITHUB_ENV
- name: Settings
uses: kanga333/[email protected]
id: settings
with:
key: ${{ github.ref_name }}
map: |
{
"^(t-names|deploy-pipeline)$": {
"node_env": "development",
"webroot": "/var/www/test/names",
"temproot": "/var/www/test/tmp-names",
"ssh_hostname": "${{ secrets.FRONT_SCORE_IP }}",
"ssh_password": "${{ secrets.FRONT_SCORE_SSH }}",
"lib_latest": "true",
"keep_source_maps": "false",
"serv": "names-test.service"
},
"^main$": {
"node_env": "production",
"webroot": "/var/www/prod/names",
"temproot": "/var/www/prod/tmp-names",
"ssh_hostname": "${{ secrets.FRONT_SCORE_IP }}",
"ssh_password": "${{ secrets.FRONT_SCORE_SSH }}",
"lib_latest": "false",
"keep_source_maps": "false",
"serv": "names.service"
}
}
export_to: output,log
mode: fill
- name: print IP address
run: |
echo "secrets.FRONT_SCORE_IP=${{ secrets.FRONT_SCORE_IP }}"
echo "steps.settings.outputs.ssh_hostname=${{ steps.settings.outputs.ssh_hostname }}"
- name: Deploy React.js
uses: ./.github/actions/deploy
with:
webroot: ${{ steps.settings.outputs.webroot }}
temproot: ${{ steps.settings.outputs.temproot }}
serv: ${{ steps.settings.outputs.serv }}
ssh_hostname: ${{ steps.settings.outputs.ssh_hostname }}
ssh_username: ${{ secrets.SERVER_USERNAME }}
ssh_password: ${{ steps.settings.outputs.ssh_password }}
lib_latest: ${{ steps.settings.outputs.lib_latest }}
keep_source_maps: ${{ steps.settings.outputs.keep_source_maps }}
nodejs_version: 18.x
github_token: ${{ secrets.GH_TOKEN }}
env:
REACT_APP_ENVIRONMENT: ${{ steps.settings.outputs.node_env }}