Implement logic for getting the list of account's domains and the list of account domains. #25
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
name: Deploy Mina Names | |
on: | |
pull_request: | |
branches: | |
- main | |
- t-names | |
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: ${{ env.ENVIRONMENT }} | |
map: | | |
{ | |
"^t-names$": { | |
"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: Deploy React.js | |
uses: ./.github/actions/mina-names | |
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 }} |