-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.51 KB
/
Copy pathdev.workflow.yml
File metadata and controls
57 lines (53 loc) · 1.51 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
name: S3 Deploy development
on:
repository_dispatch:
types: [publish-dev]
push:
branches:
- develop
jobs:
run:
runs-on: ubuntu-latest
environment: development
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
API_URL: ${{ secrets.API_URL }}
GATSBY_NEWSLETTER_API: ${{ secrets.GATSBY_NEWSLETTER_API }}
steps:
- uses: actions/checkout@v3
with:
ref: develop
#- name: Caching Gatsby
# id: gatsby-cache-build
# uses: actions/cache@v2
# with:
# path: |
# public
# .cache
# key: ${{ runner.os }}-gatsby-build-${{ github.run_id }}
# restore-keys: |
# ${{ runner.os }}-gatsby-build-
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
CI: true
- name: Deploy
uses: reggionick/s3-deploy@v3
with:
folder: public
bucket: ${{ secrets.S3_BUCKET }}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
delete-removed: true
no-cache: false
private: true
- name: Purge cache
uses: nathanvaughn/actions-cloudflare-purge@master
if: success()
# preferred
with:
cf_zone: ${{ secrets.CLOUDFLARE_ZONE }}
cf_auth: ${{ secrets.CLOUDFLARE_AUTH_KEY }}