-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (51 loc) · 1.72 KB
/
deploy.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
48
49
50
51
52
53
54
55
56
57
58
name: Deploy S3 CI
on:
push:
branches: [main, deploy]
concurrency:
group: main
cancel-in-progress: true
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.WEB_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.WEB_AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
- uses: c-hive/gha-yarn-cache@v2
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
- name: Move to docs folder
run: mv build blogdocs && mkdir -p build && mv blogdocs build/docs
- name: Deploy
uses: reggionick/s3-deploy@v3
with:
folder: build
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
bucket: ${{ secrets.WEB_BUCKET }}
bucket-region: ap-southeast-1
invalidation: /docs*
delete-removed: true
no-cache: true
private: false
filesToInclude: ".*/*,*/*,**"
# - name: Discord notification
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_GITHUB_WEBOOK }}
# DISCORD_EMBEDS: '[{
# "title": "Documentation updated",
# "author": {
# "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}",
# "name": "${{ github.actor }}",
# "url": "https://github.com/${{ github.actor }}"
# },
# "fields": [
# { "name": "Github", "value": "https://github.com/getdozer/dozer-docs", "inline": false },
# { "name": "Docs", "value": "https://getdozer.io/docs/dozer", "inline": false },
# ],
# "color": 990099
# }]'
# uses: Ilshidur/action-discord@master