Merge branch 'main' into fixes-per-deployment-refresh
This commit is contained in:
1
.github/workflows/deploy-prod.yml
vendored
1
.github/workflows/deploy-prod.yml
vendored
@@ -48,6 +48,7 @@ jobs:
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
command_timeout: 30m
|
||||
script: |
|
||||
sudo apt update && sudo apt install -y jq
|
||||
source ~/.profile
|
||||
|
||||
91
.github/workflows/deploy-staging.yml
vendored
91
.github/workflows/deploy-staging.yml
vendored
@@ -1,54 +1,55 @@
|
||||
name: remote ssh command
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- staging
|
||||
push:
|
||||
branches:
|
||||
- staging
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
environment: staging
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
build:
|
||||
name: Build
|
||||
environment: staging
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
- name: Create Config Json File
|
||||
run: |
|
||||
echo "${{ secrets.CONFIG_JSON }}" | base64 -d > config.json
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Inserts Prod Enviromental Variables
|
||||
run: |
|
||||
python -m pip install --upgrade pip pipenv
|
||||
pipenv install
|
||||
pipenv run python setup.py -e staging -f config.json
|
||||
- name: Create Config Json File
|
||||
run: |
|
||||
echo "${{ secrets.CONFIG_JSON }}" | base64 -d > config.json
|
||||
|
||||
- name: copy file via ssh
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
source: "."
|
||||
target: "infra-hideyoshi.com"
|
||||
- name: Inserts Prod Enviromental Variables
|
||||
run: |
|
||||
python -m pip install --upgrade pip pipenv
|
||||
pipenv install
|
||||
pipenv run python setup.py -e staging -f config.json
|
||||
|
||||
- name: executing remote ssh commands
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
script: |
|
||||
sudo apt update && sudo apt install -y jq
|
||||
source ~/.profile
|
||||
cd infra-hideyoshi.com
|
||||
./deploy.sh --staging
|
||||
./refresh.sh
|
||||
- name: copy file via ssh
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
source: "."
|
||||
target: "infra-hideyoshi.com"
|
||||
|
||||
- name: executing remote ssh commands
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
command_timeout: 30m
|
||||
script: |
|
||||
sudo apt update && sudo apt install -y jq
|
||||
source ~/.profile
|
||||
cd infra-hideyoshi.com
|
||||
./deploy.sh --staging
|
||||
./refresh.sh
|
||||
|
||||
Reference in New Issue
Block a user