Skip to content

perf: use new github-actions profile as riggable package instead #16

perf: use new github-actions profile as riggable package instead

perf: use new github-actions profile as riggable package instead #16

Workflow file for this run

name: Main
on:
workflow_dispatch:
inputs:
branch:
type: choice
description: Target branch name
required: false
default: main
options:
## v1 is a fixed major version
- v1
## main will always be latest (regardless of major version)
- main
## dev is for testing only
- dev
force:
type: boolean
description: Force the deployment
required: false
default: false
push:
branches:
- main
jobs:
main:
runs-on: ubuntu-latest
env:
AC_FORCE: ${{ inputs.force }}
AC_AUTOBUILD: false
AC_OUTPUT: common/temp/actions
AC_COMMIT_REPO: kc-workspace/github-actions
AC_COMMIT_BRANCH: ${{ inputs.branch || 'main' }}
steps:
- name: Set up base repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v2
- name: Set up nodejs
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache-dependency-path: pnpm-lock.yaml
cache: pnpm
- name: Install dependencies
run: common/scripts/index.sh install
- name: Lint / Build / Test packages
run: common/scripts/index.sh test
- name: Set up target repository
uses: actions/checkout@v4
with:
repository: ${{ env.AC_COMMIT_REPO }}
ref: ${{ env.AC_COMMIT_BRANCH }}
path: ${{ env.AC_OUTPUT }}
ssh-key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
fetch-depth: 0
- name: Deploy target repository
run: common/scripts/index.sh deploy