Skip to content

Deploy to production (Add discovery page, queue, and nav header) #183

Deploy to production (Add discovery page, queue, and nav header)

Deploy to production (Add discovery page, queue, and nav header) #183

Workflow file for this run

on:
push:
branches:
- main
jobs:
tests:
uses: ./.github/workflows/test.yml
name: Run tests
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
deploy:
concurrency:
cancel-in-progress: true
group: production
needs: tests
if: |
always() &&
!contains(needs.tests.result, 'failure') &&
!contains(needs.tests.result, 'cancelled')
environment:
name: production
url: https://larabox.voidgroup.net
runs-on: ubuntu-latest
steps:
- name: Write deploy key to file
run: echo "$DEPLOY_KEY" > larabox_deploy && chmod 0600 larabox_deploy
env:
DEPLOY_KEY: ${{secrets.DEPLOY_KEY}}
- name: Write known host
run: mkdir -p ~/.ssh && echo "$DEPLOY_HOSTKEY" >> ~/.ssh/known_hosts
env:
DEPLOY_HOSTKEY: ${{vars.DEPLOY_HOSTKEY}}
- name: Deploy to target
run: >
ssh -i larabox_deploy "${{vars.DEPLOY_TARGET}}" "${{github.sha}}"
name: Deploy to production
run-name: Deploy to production (${{ github.event.head_commit.message }})