Skip to content

feat(ototoy): add provider for ototoy.jp #271

feat(ototoy): add provider for ototoy.jp

feat(ototoy): add provider for ototoy.jp #271

Workflow file for this run

name: Deno
on:
push:
tags: ['v*']
pull_request:
branches: ['main']
workflow_dispatch:
inputs:
perform_deploy:
type: boolean
required: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.4.x
- name: Verify formatting
run: deno fmt --check
- name: Run linter
run: deno lint
- name: Run type check
run: deno task check
- name: Run tests
# CI tests should run offline and only request minimal permissions
run: deno test --deny-net --allow-read --allow-env
deploy:
if: >-
vars.DEPLOY_ENABLED == 'true' &&
contains(fromJSON(vars.DEPLOYERS), github.actor) &&
(startsWith(github.ref, 'refs/tags/v') || inputs.perform_deploy)
runs-on: ubuntu-latest
needs: test
env:
WORK_DIR: harmony
steps:
- name: Setup repo
uses: actions/checkout@v4
with:
path: ${{ env.WORK_DIR }}
- name: Deploy
uses: easingthemes/[email protected]
with:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
ARGS: '-cilrvz --delete'
SOURCE: ${{ env.WORK_DIR }}/
REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
REMOTE_PORT: ${{ secrets.DEPLOY_PORT || 22 }}
REMOTE_USER: ${{ secrets.DEPLOY_USER }}
TARGET: ${{ secrets.DEPLOY_TARGET }}
EXCLUDE: '/deno.lock, /.env, /snaps.db, /snaps/'
SCRIPT_BEFORE_REQUIRED: true
SCRIPT_BEFORE: |
set -e
ls -al "${{ secrets.DEPLOY_TARGET }}"
SCRIPT_AFTER_REQUIRED: true
SCRIPT_AFTER: |
set -e
ls -al "${{ secrets.DEPLOY_TARGET }}"
cd "${{ secrets.DEPLOY_TARGET }}"
deno task build
if [[ -n "${{ secrets.DEPLOY_SERVICE }}" ]]; then
systemctl --user restart "${{ secrets.DEPLOY_SERVICE }}"
fi