Skip to content

Commit

Permalink
Automate live deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
floodcode committed Jul 8, 2024
1 parent 681e1a7 commit fec1fc7
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
24 changes: 24 additions & 0 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Deploy new version'
inputs:
environment:
required: true
nomad-cacert:
required: true
nomad-token:
required: true
nomad-addr:
required: true

runs:
using: "composite"
steps:
- name: Deploy new version
shell: bash
env:
NOMAD_CACERT: ${{ inputs.nomad-cacert }}
NOMAD_TOKEN: ${{ inputs.nomad-token }}
NOMAD_ADDR: ${{ inputs.nomad-addr }}
run: |
curl -L https://releases.hashicorp.com/nomad/1.6.3/nomad_1.6.3_linux_amd64.zip -o nomad.zip
unzip nomad.zip
./nomad job run operations/deploy-${{ inputs.environment }}.hcl
7 changes: 7 additions & 0 deletions .github/workflows/live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ jobs:
docker-username: ${{ secrets.DOCKER_HUB_USERNAME }}
docker-password: ${{ secrets.DOCKER_HUB_PASSWORD }}
docker-tag: latest
- name: Deploy
uses: ./.github/actions/deploy
with:
environment: live
nomad-cacert: operations/admin-ui-ca.crt
nomad-token: ${{ secrets.NOMAD_TOKEN_DEPLOY }}
nomad-addr: ${{ secrets.NOMAD_DEPLOY_ADDR }}
31 changes: 31 additions & 0 deletions operations/admin-ui-ca.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-----BEGIN CERTIFICATE-----
MIIFVzCCAz+gAwIBAgIUdUo5LO+M2vEiSyfvDSOhKxVBko0wDQYJKoZIhvcNAQEL
BQAwOzELMAkGA1UEBhMCTk8xETAPBgNVBAoMCEF0b3IgTExDMRkwFwYDVQQDDBBB
dG9yIEFkbWluIFVJIENBMB4XDTIzMDUxMDE0NTk0M1oXDTQzMDIyNDE0NTk0M1ow
O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