-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.5 KB
/
main.yml
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
name: Build and Deploy
on:
pull_request:
branches: [main]
push:
branches: [main]
# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
run_install: true
- name: Setup Node.JS
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18.x
- name: Generate pages
env:
BASE_URL: ${{ vars.BASE_URL }}
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
FIREBASE_MEASUREMENT_ID: ${{ secrets.FIREBASE_MEASUREMENT_ID }}
FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}
VITE_PROJECT_ID: ${{ vars.PROJECT_ID }}
VITE_GTM_ID: ${{ vars.GTM_ID }}
run: pnpm build
- name: Upload pages
uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: build
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write
steps:
- name: Deploy pages
id: deploy
uses: actions/deploy-pages@v4