Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment configuration base-nuxt for filmz #1

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Deployment'

on:
push:
branches:
- main
- master
- develop

jobs:
build_and_deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0

- name: 'Pakman'
uses: upmaru/pakman@alpine-3.18-7.4
with:
command: 'bootstrap'
env:
ABUILD_PRIVATE_KEY: ${{secrets.ABUILD_PRIVATE_KEY}}
ABUILD_PUBLIC_KEY: ${{secrets.ABUILD_PUBLIC_KEY}}

- name: 'Build APK'
uses: upmaru/pakman@alpine-3.18-7.4
with:
entrypoint: /var/lib/pakman/bin/build.sh

- name: 'Archive'
uses: upmaru/pakman@alpine-3.18-7.4
with:
entrypoint: /var/lib/pakman/bin/archive.sh

- name: 'Create Deployment'
uses: upmaru/pakman@alpine-3.18-7.4
with:
command: 'create_deployment'
archive: 'packages.zip'
env:
WORKFLOW_REF: ${{ github.ref }}
WORKFLOW_SHA: ${{ github.sha }}
INSTELLAR_ENDPOINT: https://sandbox.opsmaru.dev
INSTELLAR_PACKAGE_TOKEN: ${{secrets.INSTELLAR_PACKAGE_TOKEN}}
INSTELLAR_AUTH_TOKEN: ${{secrets.INSTELLAR_AUTH_TOKEN}}
54 changes: 54 additions & 0 deletions instellar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
dependencies:
build:
- nodejs-current
- npm
- vips-dev
runtime:
- nodejs-current
- npm
- bash
- curl
- s6
- jq
- ca-certificates
- icu-data-full
- filmz-openrc
trace: true

stack: alpine/3.18

build:
command: |
npm install
npm run build
destinations:
- .output

run:
name: filmz
services:
- binary: node
name: web
path: /usr/bin
start:
call: .output/server/index.mjs

hook:
post-deinstall: |
rc-service filmz stop
rc-update del filmz
post-install: |
rc-update add filmz
post-upgrade: |
rc-service filmz start
pre-upgrade: |
rc-service filmz stop

kits:
- description: Web service configuration
main: true
name: web
ports:
- main: true
name: web
target: 3000