workflow for prod

This commit is contained in:
Christoph Haas 2025-11-02 01:09:10 +01:00
parent da3ee60ea3
commit b2cb9344e5

View file

@ -3,7 +3,7 @@ name: Build Astro and deploy dist
on: on:
push: push:
branches: branches:
- stage # or your default branch - prod # or your default branch
workflow_dispatch: workflow_dispatch:
permissions: permissions:
@ -12,7 +12,7 @@ permissions:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: stage environment: prod
steps: steps:
- name: Checkout code - name: Checkout code
@ -29,7 +29,7 @@ jobs:
- name: Build Astro project - name: Build Astro project
run: npm run build run: npm run build
- name: Deploy dist to dist-stage - name: Deploy dist to dist-prod
run: | run: |
# Configure Git # Configure Git
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
@ -46,7 +46,7 @@ jobs:
git branch git branch
git commit -m "Update dist/ [skip ci]" git commit -m "Update dist/ [skip ci]"
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Signum/workaround-astro-starlight.git temp-build:dist-stage --force git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Signum/ispmail-workaround-org.git temp-build:dist-prod --force
- name: Trigger deployment webhook - name: Trigger deployment webhook
run: | run: |