Merge branch 'stage' into prod

This commit is contained in:
Christoph Haas 2025-11-02 13:25:21 +01:00
commit 64ad7eb177

View file

@ -3,16 +3,18 @@ name: Build Astro and deploy dist
on:
push:
branches:
- prod # or your default branch
- stage
- prod
workflow_dispatch:
permissions:
contents: write # 👈 This is required for pushing branches
contents: write # 👈 This is required for pushing branches
jobs:
build:
runs-on: ubuntu-latest
environment: prod
# Dynamically set environment name based on branch
environment: ${{ github.ref_name }}
steps:
- name: Checkout code
@ -21,7 +23,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22' # match your project
node-version: "22" # match your project
- name: Install dependencies
run: npm ci
@ -29,7 +31,7 @@ jobs:
- name: Build Astro project
run: npm run build
- name: Deploy dist to dist-prod
- name: Deploy dist to dist-${{ github.ref_name }}
run: |
# Configure Git
git config user.name "github-actions[bot]"
@ -46,7 +48,7 @@ jobs:
git branch
git commit -m "Update dist/ [skip ci]"
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Signum/ispmail-workaround-org.git temp-build:dist-prod --force
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} temp-build:dist-${{ github.ref_name }} --force
- name: Trigger deployment webhook
run: |
@ -54,4 +56,3 @@ jobs:
env:
DEPLOY_WEBHOOK: ${{ secrets.COOLIFY_DEPLOY_WEBHOOK }}
DEPLOY_TOKEN: ${{ secrets.COOLIFY_DEPLOY_TOKEN }}