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