-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (32 loc) · 1.13 KB
/
deploy_changes.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
name: Levels deploy
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Upgrade levels
run: |
python upgrader.py
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Sync files
run: |
aws s3 cp ./summary.json s3://levels.i4k/summary.json
aws s3 sync --follow-symlinks --delete ./Solutions s3://levels.i4k/Solutions
aws s3 sync --follow-symlinks --delete ./Templates s3://levels.i4k/Templates
aws s3 sync --follow-symlinks --delete ./Tutorials s3://levels.i4k/Tutorials
aws s3 sync --follow-symlinks --delete ./Modules s3://levels.i4k/Modules
- name: Invalidate Cloudfront
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_ID }} --paths "/*"