Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Dropdown and Nav (#33) #23

Dropdown and Nav (#33)

Dropdown and Nav (#33) #23

name: Deploy to testing
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-deploy:
name: Build and deploy to testing
runs-on: ubuntu-latest
environment:
name: testing
url: https://starknet-explorer.lambdaclass.com/
steps:
- name: Checkout
uses: actions/[email protected]
- name: Create ssh private key file from env var
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
run: |
set -ex
sed -E 's/(-+(BEGIN|END) OPENSSH PRIVATE KEY-+) *| +/\1\n/g' <<< "$SSH_KEY" > id_ed25519_testing
chmod 400 id_ed25519_testing
- name: Install ansible
run: |
pip install ansible
- name: "Deploy with ansible"
env:
MIX_ENV: ${{ vars.MIX_ENV }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }}
PHX_HOST: ${{ vars.PHX_HOST }}
PHX_SERVER: ${{ vars.PHX_SERVER }}
RPC_API_HOST: ${{ secrets.RPC_API_HOST }}
ANSIBLE_SSH_PKEY_DIR: "./id_ed25519_testing"
GIT_BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
ansible-playbook -i ansible/inventory.yaml ansible/playbooks/deployment.yaml