-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (56 loc) · 2.05 KB
/
deploy.yaml
File metadata and controls
70 lines (56 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Deploy Astro Website
on:
push:
branches:
- main # Trigger deployment on pushes to the `main` branch
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Install Bun (the JavaScript runtime)
- name: Install Bun
run: curl -fsSL https://bun.sh/install | bash
# Add Bun to PATH
- name: Add Bun to PATH
run: echo "$HOME/.bun/bin" >> $GITHUB_PATH
# Remove old node_modules and lock files
- name: Clean up old dependencies
run: |
rm -rf node_modules
rm -f package-lock.json
rm -f bun.lockb
rm -f yarn.lock
# Install dependencies using Bun
- name: Install dependencies
run: bun install
# Build the Astro project using Bun
- name: Build the Astro project
run: bun run build
- name: Set up Firebase Authentication using Service Account
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
- name: Install Firebase CLI
run: |
bun add -g firebase-tools
- name: Deploy to Firebase Hosting
run: |
firebase deploy --only hosting
env:
CI: false
# # Deploy to GitHub Pages (using the latest stable version of the deploy action)
# - name: Deploy to GitHub Pages
# uses: JamesIves/github-pages-deploy-action@v4 # Updated version
# with:
# branch: gh-pages # The branch that will be used to deploy
# folder: dist # The folder that contains the built Astro site
# env:
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# # Log the deployed site URL automatically
# - name: Log deployed site URL
# run: |
# DEPLOYED_URL="https://${{ github.actor }}.github.io/${{ github.event.repository.name }}"
# echo "Your site is deployed to: https://${{ github.actor }}.github.io/${{ github.event.repository.name }}"