-
Notifications
You must be signed in to change notification settings - Fork 195
72 lines (69 loc) · 1.86 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Install ruby-bundler
run: |
sudo apt-get update
sudo apt-get install -y ruby-bundler
- name: Cache gems
id: cache-gems
uses: actions/cache@v3
with:
path: |
.bundle
vendor/bundle
key: gems-${{ hashFiles('**/Gemfile.lock') }}
- name: Install gems
if: steps.cache-gems.outputs.cache-hit != 'true'
run: |
bundle config set --local path vendor/bundle
bundle install
- name: Build
run: bundle exec jekyll build
- name: Upload
uses: actions/upload-artifact@v3
with:
name: site
path: _site/*
publish:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-22.04
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.S3_SECRET_KEY }}
aws-region: us-east-1
- name: Configure Cloudflare credentials
run: |
(
echo "defaults:"
echo " domain: frida.re"
echo " email: ${{ secrets.CF_EMAIL }}"
echo " token: ${{ secrets.CF_TOKEN }}"
) > ~/.cfcli.yml
shell: bash
- name: Install cloudflare-cli
run: npm install -g cloudflare-cli
- name: Download site
uses: actions/download-artifact@v3
with:
name: site
path: _site/
- name: Deploy site
run: _releng/deploy.py