Skip to content

✨v4.6: Feature Flags, URL Redirection Fixes, and Project Category Filtering #54

✨v4.6: Feature Flags, URL Redirection Fixes, and Project Category Filtering

✨v4.6: Feature Flags, URL Redirection Fixes, and Project Category Filtering #54

Workflow file for this run

name: Build and Deploy Astro Project
on: pull_request
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js 20
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.bun
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Bun
run: |
curl -fsSL https://bun.sh/install | bash
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
- name: Install dependencies and build
run: |
if command -v bun &> /dev/null; then
bun install astro@latest # Install Astro explicitly if using Bun
bun install
bun run astro build
else
npm install
npm run build
fi
- name: Push to testing-deploy branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: testing-deploy
FOLDER: .vercel/output/static
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build: (${GITHUB_SHA}) ${GITHUB_HEAD_REF}"