Skip to content

Merge pull request #54 from clj-codes/bump/deps-2024-10-17 #41

Merge pull request #54 from clj-codes/bump/deps-2024-10-17

Merge pull request #54 from clj-codes/bump/deps-2024-10-17 #41

Workflow file for this run

name: Deploy
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- 'docs/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
tests_karma:
strategy:
matrix:
os-version: [ubuntu-latest]
node-version: [18.x]
runs-on: ${{ matrix.os-version }}
steps:
- name: Clone Repo
uses: actions/[email protected]
- name: Prepare java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install clojure cli
uses: DeLaGuardo/setup-clojure@master
with:
cli: 1.12.0.1479
- name: Karma Tests ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: |
npm ci
npm run test
build_web:
strategy:
matrix:
os-version: [ubuntu-latest]
node-version: [18.x]
runs-on: ${{ matrix.os-version }}
steps:
- name: Clone Repo
uses: actions/[email protected]
- name: Prepare java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install clojure cli
uses: DeLaGuardo/setup-clojure@master
with:
cli: 1.12.0.1479
- name: Setup Node ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: |
npm ci
npm run release
- name: Upload web artifact
uses: actions/upload-artifact@v4
with:
name: built-web
path: resources/public
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: [tests_karma, build_web]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download web artifact
uses: actions/download-artifact@v4
with:
name: built-web
path: resources/public
- name: Display structure of downloaded files
run: ls -R
- uses: superfly/flyctl-actions/setup-flyctl@master
# --ha=false because by default fly.io spins two machines for high availability
- run: flyctl deploy --remote-only --ha=false
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}