Skip to content

Merge pull request #16 from kubukoz/permalink-support #50

Merge pull request #16 from kubukoz/permalink-support

Merge pull request #16 from kubukoz/permalink-support #50

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches: ["**"]
push:
branches: ["main"]
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "17.6.0"
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: sbt
- run: sbt test
- name: Compress target directories
run: tar cf targets.tar target project/target
- name: Upload target directories
uses: actions/upload-artifact@v3
with:
name: target-ubuntu-latest-temurin-17
path: targets.tar
deploy:
needs: build
name: Deploy app
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "17.6.0"
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: sbt
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl auth docker
env:
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }}
- run: sbt "backend / Docker / publish"
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }}