-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.3 KB
/
release.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: Release
on:
push:
tags:
- v*
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18.2.x
- run: npm install
- run: npm run build
- uses: actions/upload-artifact@v1
with:
name: out
path: ./out
publish:
name: Publish
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 18.2.x
- uses: actions/download-artifact@v1
with:
name: out
path: ./out
- run: aws s3 cp ./out s3://${{ secrets.AWS_BUCKET }} --recursive
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
- run: |+
curl --silent --request POST \
--url https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE_ID }}/purge_cache \
--header 'Authorization: Bearer ${{ secrets.CF_API_KEY }}' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Email: ${{ secrets.CF_API_EMAIL }}' \
--data '{"purge_everything":true}'