File tree Expand file tree Collapse file tree 3 files changed +84
-7
lines changed Expand file tree Collapse file tree 3 files changed +84
-7
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' **' # Currently any tag, need to slim down
7
+ paths :
8
+ - pyscriptjs/**
9
+ - .github/workflows/** # Test that workflows work when changed
10
+
11
+ pull_request :
12
+ paths :
13
+ - pyscriptjs/**
14
+ - .github/workflows/**
15
+
16
+ jobs :
17
+ build :
18
+ runs-on : ubuntu-latest
19
+ permissions :
20
+ contents : read
21
+ id-token : write
22
+ defaults :
23
+ run :
24
+ working-directory : ./pyscriptjs
25
+
26
+ steps :
27
+ - name : Checkout
28
+ uses : actions/checkout@v3
29
+ - name : Install node
30
+ uses : actions/setup-node@v3
31
+ with :
32
+ node-version : 12.x
33
+ - name : Cache node modules
34
+ uses : actions/cache@v3
35
+ env :
36
+ cache-name : cache-node-modules
37
+ with :
38
+ # npm cache files are stored in `~/.npm` on Linux/macOS
39
+ path : ~/.npm
40
+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
41
+ restore-keys : |
42
+ ${{ runner.os }}-build-${{ env.cache-name }}-
43
+ ${{ runner.os }}-build-
44
+ ${{ runner.os }}-
45
+ - name : Install dependencies
46
+ run : |
47
+ npm install
48
+ - name : Build pyscript
49
+ run : |
50
+ npm run build
51
+ # Deploy to S3
52
+ - name : Configure AWS credentials
53
+ uses : aws-actions/configure-aws-credentials@v1.6.1
54
+ with :
55
+ aws-region : ${{secrets.AWS_REGION}}
56
+ role-to-assume : ${{ secrets.AWS_OIDC_RUNNER_ROLE }}
57
+ - name : Sync to S3
58
+ run : aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied?
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ name: Build
2
2
3
3
on :
4
4
push : # Only run on merges into master that modify files under pyscriptjs/
5
- branches : main
5
+ branches :
6
+ - main
6
7
paths :
7
8
- pyscriptjs/**
8
9
- .github/workflows/** # Test that workflows work when changed
13
14
- .github/workflows/**
14
15
15
16
jobs :
16
- build :
17
- runs-on : ubuntu-latest # Will be self hosted soon
18
- defaults :
19
- run :
20
- working-directory : ./pyscriptjs
17
+ build :
18
+ runs-on : ubuntu-latest
19
+ permissions :
20
+ contents : read
21
+ id-token : write
22
+ defaults :
23
+ run :
24
+ working-directory : ./pyscriptjs
21
25
22
26
steps :
23
27
- name : Checkout
44
48
- name : Build pyscript
45
49
run : |
46
50
npm run build
51
+ # Deploy to S3
52
+ - name : Configure AWS credentials
53
+ uses : aws-actions/configure-aws-credentials@v1.6.1
54
+ with :
55
+ aws-region : ${{secrets.AWS_REGION}}
56
+ role-to-assume : ${{ secrets.AWS_OIDC_RUNNER_ROLE }}
57
+ - name : Sync to S3
58
+ run : aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied?
Original file line number Diff line number Diff line change 1
1
name : Lint
2
2
3
3
on :
4
+
4
5
push : # Only run on merges into master that modify files under pyscriptjs/
5
6
branches :
6
7
- main
8
+ paths :
9
+ - pyscriptjs/**
10
+ - .github/workflows/** # Test that workflows work when changed
7
11
8
- pull_request : # Run on any PR that modifies files in pyscriptjs/
12
+ pull_request : # Run on any PR that modifies files in pyscriptjs/
13
+ paths :
14
+ - pyscriptjs/**
15
+ - .github/workflows/**
9
16
10
17
jobs :
11
18
build :
You can’t perform that action at this time.
0 commit comments