-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.26 KB
/
deploy-main.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
name: Build and deploy site
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v2
- name: Install node 16
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install PNPM and install deps
uses: pnpm/action-setup@v2.0.1
with:
version: 6.2.3
run_install: true
- name: Build using Rollup
run: pnpm run build
- name: Copy site dir to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: zenmumbler.net
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: site
DEST_DIR: dtbb
- name: Purge Cloudflare cache
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_PURGE_TOKEN }}
PURGE_URLS: '["https://zenmumbler.net/dtbb/dtbb.css","https://zenmumbler.net/dtbb/dtbb.js","https://zenmumbler.net/dtbb/index.html","https://zenmumbler.net/dtbb/task_indexer.js","https://zenmumbler.net/dtbb/data/manifest.json"]'