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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- prod # or your default branch
|
- stage
|
||||||
|
- prod
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|
@ -12,7 +13,8 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: prod
|
# Dynamically set environment name based on branch
|
||||||
|
environment: ${{ github.ref_name }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
@ -21,7 +23,7 @@ jobs:
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '22' # match your project
|
node-version: "22" # match your project
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
@ -29,7 +31,7 @@ jobs:
|
||||||
- name: Build Astro project
|
- name: Build Astro project
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Deploy dist to dist-prod
|
- name: Deploy dist to dist-${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
# Configure Git
|
# Configure Git
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
|
|
@ -46,7 +48,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/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
|
- name: Trigger deployment webhook
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -54,4 +56,3 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DEPLOY_WEBHOOK: ${{ secrets.COOLIFY_DEPLOY_WEBHOOK }}
|
DEPLOY_WEBHOOK: ${{ secrets.COOLIFY_DEPLOY_WEBHOOK }}
|
||||||
DEPLOY_TOKEN: ${{ secrets.COOLIFY_DEPLOY_TOKEN }}
|
DEPLOY_TOKEN: ${{ secrets.COOLIFY_DEPLOY_TOKEN }}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue