53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: Rooted - Base Web Deployment
|
|
|
|
inputs:
|
|
REPOSITORY:
|
|
description: "The repository to checkout and build, in format `owner/repository`"
|
|
required: true
|
|
MONGO_URI:
|
|
description: "MongoDB URI to use for this instance"
|
|
required: true
|
|
DB_NAME:
|
|
description: "MongoDB database to target"
|
|
required: true
|
|
default: "rooted_db_dev"
|
|
NEXTAUTH_SECRET:
|
|
description: "NextAuth secret to use for this instance"
|
|
required: false
|
|
default: ${{ secrets.NEXTAUTH_SECRET }}
|
|
BRANCH:
|
|
description: "Branch to deploy for this job"
|
|
required: false
|
|
default: ${{ gitea.ref_name }}
|
|
GITHUB_SERVER_URL:
|
|
description: "Github server where this repository is hosted"
|
|
required: false
|
|
default: "https://gitea.lab.mikayla.dev"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
github-server-url: ${{ gitea.event.inputs.github-server-url }}
|
|
repository: ${{ gitea.event.inputs.repository }}
|
|
ref: ${{ gitea.event.inputs.branch }}
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
cd Rooted/Rooted.Web && npm install
|
|
|
|
- name: Write .env file
|
|
run: |
|
|
echo "MONGO_URI=${{ gitea.event.inputs.mongo-uri }}" >>.env
|
|
echo "DB_NAME=${{ gitea.event.inputs.db-name }}" >>.env
|
|
echo "NEXTAUTH_SECRET=${{ gitea.event.inputs.nextauth-secret }}" >>.env
|
|
echo "GCP_CLIENT_ID=${{ secrets.GCP_CLIENT_ID }}" >>.env
|
|
echo "GCP_CLIENT_SECRET=${{ secrets.GCP_CLIENT_SECRET }}" >>.env
|
|
cp .env Rooted/Rooted.Web/.env
|
|
|
|
- name: Build
|
|
run: |
|
|
cd Rooted/Rooted.Web && npm run build
|