Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Sep 7, 2024
1 parent 91be452 commit f7a4a6e
Showing 1 changed file with 42 additions and 28 deletions.
70 changes: 42 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,39 +299,53 @@ jobs:
env:
TZ: Australia/Melbourne
TERM: xterm-256color
# Directory to use for artifact deployments.
VORTEX_DEPLOY_ARTIFACT_SRC: /tmp/workspace/code
# Source code location for artifact deployments.
VORTEX_DEPLOY_ARTIFACT_ROOT: $GITHUB_WORKSPACE

steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# # Fetch all history for git repository.
# fetch-depth: 0
# # Do not persist credentials after checkout
# # to allow using the custom credentials to push to a remote repo.
# persist-credentials: false
# ref: ${{ github.head_ref || github.ref_name }}

# - name: Setup SSH private key
# uses: shimataro/ssh-key-action@v2
# with:
# key: ${{ secrets.VORTEX_DEPLOY_SSH_PRIVATE_KEY }}
# known_hosts: ${{ secrets.VORTEX_DEPLOY_SSH_KNOWN_HOSTS }}

- name: Preserve $HOME set in the container
run: echo HOME=/root >> "$GITHUB_ENV"

- name: Checkout code
uses: actions/checkout@v4
with:
# Fetch all history for git repository.
fetch-depth: 0
# Do not persist credentials after checkout
# to allow using the custom credentials to push to a remote repo.
persist-credentials: false
ref: ${{ github.head_ref || github.ref_name }}

- name: Setup SSH private key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.VORTEX_DEPLOY_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.VORTEX_DEPLOY_SSH_KNOWN_HOSTS }}

- name: Download exported codebase as artifact
uses: actions/download-artifact@v4
with:
name: code-artifact
# path: "/tmp/workspace/code"

- run: |
pwd
ls -la || true
ls -la vendor || true
path: "/tmp/workspace/code"

# - name: Deploy
# run: |
# VORTEX_DEPLOY_BRANCH="${{ github.ref }}"
# VORTEX_DEPLOY_PR="$(echo ${CIRCLE_PULL_REQUEST} | cut -d'/' -f 7)" \
# VORTEX_DEPLOY_PR_HEAD=${CIRCLE_SHA1} \
# ./scripts/vortex/deploy.sh
# timeout-minutes: 30
- name: Debug vars
run: |
echo VORTEX_DEPLOY_BRANCH
echo "${{ github.ref }}"
echo ---
echo VORTEX_DEPLOY_PR
echo "$(echo ${{ github.ref }} | cut -d'/' -f 7)" \
echo ---
echo VORTEX_DEPLOY_PR_HEAD
echo ${{ github.head_ref || github.ref_name }}
- name: Deploy
run: |
VORTEX_DEPLOY_BRANCH="${{ github.ref }}"
VORTEX_DEPLOY_PR="$(echo ${{ github.ref }} | cut -d'/' -f 7)" \
VORTEX_DEPLOY_PR_HEAD=${{ github.head_ref || github.ref_name }} \
./scripts/vortex/deploy.sh
timeout-minutes: 30

0 comments on commit f7a4a6e

Please sign in to comment.