Release v1.12.3 #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Production | |
on: | |
release: | |
# TODO: Replace this with "released" once we reach 1.0 | |
types: [published] | |
env: | |
BANCHAN_DEPLOY_ENV: prod | |
BANCHAN_HOST: banchan.art | |
OBAN_KEY_FINGERPRINT: ${{ secrets.OBAN_KEY_FINGERPRINT }} | |
OBAN_LICENSE_KEY: ${{ secrets.OBAN_LICENSE_KEY }} | |
jobs: | |
deploy: | |
name: Deploy Banchan to Production Server | |
runs-on: ubuntu-latest | |
environment: | |
name: Production | |
url: https://banchan.art | |
strategy: | |
matrix: | |
elixir: [1.14.5] | |
otp: [25] | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Setup BEAM | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Retrieve Cached Dependencies | |
uses: actions/cache@v2 | |
id: mix-cache | |
with: | |
path: | | |
deps | |
_build | |
priv/plts | |
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | |
- name: Install Dependencies | |
if: steps.mix-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p priv/plts | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
mix deps.compile | |
mix dialyzer --plt | |
- run: mix deploy.prod --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_PROD_DEPLOY_API_TOKEN }} |