Skip to content

Merge pull request #82 from adamreese/remove-www #59

Merge pull request #82 from adamreese/remove-www

Merge pull request #82 from adamreese/remove-www #59

Workflow file for this run

name: Deploy Website
on:
push:
branches:
- 'main'
workflow_dispatch:
# Construct a concurrency group to be shared across workflow runs.
# The default behavior ensures that only one is running at a time, with
# all others queuing and thus not interrupting runs that are in-flight.
concurrency: ${{ github.workflow }}
permissions:
contents: read
jobs:
build:
uses: fermyon/finicky-whiskers/.github/workflows/build.yml@main
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: app
path: "${{ github.workspace }}"
- name: Setup Spin
uses: fermyon/actions/spin/setup@v1
with:
version: v1.4.1
- name: Login to Fermyon Cloud
run: spin cloud login --token "${{ secrets.FERMYON_CLOUD_TOKEN }}"
- name: Deploy to Fermyon Cloud
uses: fermyon/actions/spin/deploy@v1
with:
run_build: false
fermyon_token: "${{ secrets.FERMYON_CLOUD_TOKEN }}"
- name: Run sqlite migration(s)
run: |
# NOTE: workaround for not being able to use 'default' as the database name
SQLITE_DB_NAME="$(spin cloud sqlite list | grep 'default' | cut -d ' ' -f1)"
spin cloud sqlite execute "$SQLITE_DB_NAME" "@highscore/migration.sql"