Skip to content

Commit 0287b71

Browse files
authored
add build and deploy to s3 upon merge to master action (#51)
1 parent 3cdffce commit 0287b71

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/deploy-s3.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build Website and Deploy to S3
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build-cache:
8+
name: Build Website
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
- name: Setup Anaconda
14+
uses: goanpeca/setup-miniconda@v1
15+
with:
16+
auto-update-conda: true
17+
auto-activate-base: true
18+
miniconda-version: 'latest'
19+
python-version: 3.7
20+
environment-file: environment.yml
21+
activate-environment: qe-lectures
22+
- name: Checkout QuantEcon theme
23+
uses: actions/checkout@v2
24+
with:
25+
repository: QuantEcon/lecture-python-programming.theme
26+
token: ${{ secrets.ACTIONS_PAT }}
27+
path: theme/lecture-python-programming.theme
28+
- name: Build Website files
29+
shell: bash -l {0}
30+
run: |
31+
make website THEMEPATH=theme/lecture-python-programming.theme
32+
ls _build/website/jupyter_html/*
33+
- name: Configure AWS credentials
34+
uses: aws-actions/configure-aws-credentials@v1
35+
with:
36+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
37+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
38+
aws-region: ap-southeast-2
39+
- name: Copy files to S3 with the AWS CLI
40+
run: |
41+
aws s3 sync _build/website/jupyter_html/* s3://test.python.quantecon.org/

0 commit comments

Comments
 (0)