Merge branch 'stage' into prod
This commit is contained in:
commit
64ad7eb177
1 changed files with 10 additions and 9 deletions
13
.github/workflows/build-and-deploy.yml
vendored
13
.github/workflows/build-and-deploy.yml
vendored
|
|
@ -3,7 +3,8 @@ name: Build Astro and deploy dist
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- prod # or your default branch
|
||||
- stage
|
||||
- prod
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
|
|
@ -12,7 +13,8 @@ permissions:
|
|||
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 }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue