-
Notifications
You must be signed in to change notification settings - Fork 65
77 lines (65 loc) · 2.11 KB
/
jekyll.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
67
68
69
70
71
72
73
74
75
76
77
name: Build Jekyll and Deploy to Firebase
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
schedule:
- cron: "0 2 * * *"
env:
JEKYLL_ENV: production
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache Bundler 💾
uses: actions/cache@v3
with:
path: ~/.firebase, ~/.jekyll-cache, ~/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Cache NPM packages 💾
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "22"
cache: "npm"
- name: Use Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Install dependencies 🔧
run: |
npm ci
bundle config set path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Build 🏗
run: bundle exec jekyll build --trace
- name: Deploy to Firebase
if: github.ref == 'refs/heads/master'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ANGULAR_DE }}"
channelId: live
projectId: angular-de
- name: Deploy Preview to Firebase
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ANGULAR_DE }}"
projectId: angular-de