-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.19 KB
/
frontend.yaml
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
name: Deploy the Ghost theme
on:
pull_request:
branches:
- 'live'
paths:
- 'frontend/**'
jobs:
deploy-frontend:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install dependencies
working-directory: frontend
run: yarn install
- name: Generate CSS & JS
working-directory: frontend
run: yarn pretest
- name: Package the theme into a zip file
working-directory: frontend
run: yarn zip
- name: Deploy and activate the theme
working-directory: frontend
env:
GHOST_API_URL: ${{ secrets.GHOST_ADMIN_API_URL }}
GHOST_API_KEY: ${{ secrets.GHOST_ADMIN_API_KEY }}
run: yarn deploy
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Clear Lightsail Distribution Cache
run: |
aws lightsail reset-distribution-cache --distribution-name ${{ secrets.LIGHTSAIL_DISTRIBUTION }}