Rename PI_TEST_* secrets to PI_MAIN_* and centralize adjustable workflow values

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-07-24 16:18:46 +02:00
co-authored by Junie
parent fd31f02091
commit 3e537162c0
5 changed files with 68 additions and 22 deletions
+20 -6
View File
@@ -6,6 +6,16 @@ on:
push:
branches: [master]
# Herbruikbare instellingen voor deze workflow. Pas deze aan op één plek als
# de Node/pnpm-versie wijzigt. Let op: de env-context is NIET beschikbaar in
# de `with:`-inputs van een aangeroepen reusable workflow (zie de deploy-test
# job hieronder), dat is een beperking van GitHub/Gitea Actions zelf, dus
# ARTIFACT_NAME/DEPLOY_ENVIRONMENT/DEPLOY_PATH blijven daar noodgedwongen
# letterlijk in de `with:`-sectie staan.
env:
NODE_VERSION: '20'
PNPM_VERSION: '9'
jobs:
prepare:
runs-on: ubuntu-latest
@@ -14,11 +24,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: 9
version: ${{ env.PNPM_VERSION }}
- name: Get pnpm store directory
id: pnpm-store
@@ -41,11 +51,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: 9
version: ${{ env.PNPM_VERSION }}
- name: Get pnpm store directory
id: pnpm-store
@@ -78,11 +88,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: 9
version: ${{ env.PNPM_VERSION }}
- name: Get pnpm store directory
id: pnpm-store
@@ -108,6 +118,10 @@ jobs:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
uses: ./.gitea/workflows/deploy.yaml
secrets: inherit
# Let op: deze waarden kunnen hier NIET via het `env:`-blok bovenaan dit
# bestand worden gezet - de env-context is niet beschikbaar in de
# `with:`-sectie van een aangeroepen reusable workflow (beperking van
# GitHub/Gitea Actions zelf). Pas deze waarden dus rechtstreeks hier aan.
with:
artifact_name: dist
environment: test
+4 -4
View File
@@ -31,10 +31,10 @@ jobs:
- name: Upload dist to ${{ inputs.environment }} web server via SCP
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.PI_TEST_HOST }}
port: ${{ secrets.PI_TEST_PORT }}
username: ${{ secrets.PI_TEST_USERNAME }}
password: ${{ secrets.PI_TEST_PASSWORD }}
host: ${{ secrets.PI_MAIN_HOST }}
port: ${{ secrets.PI_MAIN_PORT }}
username: ${{ secrets.PI_MAIN_USERNAME }}
password: ${{ secrets.PI_MAIN_PASSWORD }}
source: "dist/*"
target: ${{ inputs.deploy_path }}
strip_components: 1