File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ pull_request :
3
+ types : [opened, edited, reopened, synchronize]
4
+
5
+ jobs :
6
+ build_css :
7
+ runs-on : ubuntu-latest
8
+ env :
9
+ source : public/dist/assets
10
+ destination : assets/website-2021-dev/pr-${{ github.event.number }}/
11
+ steps :
12
+ - name : Checkout source Git branch
13
+ uses : actions/checkout@v2
14
+ with :
15
+ ref : ${{github.event.pull_request.head.ref}}
16
+ persist-credentials : false
17
+
18
+ - name : Use Node.js
19
+ uses : actions/setup-node@v2
20
+ with :
21
+ node-version : ' 16'
22
+
23
+ - name : Install npm modules
24
+ run : npm install
25
+
26
+ - name : compile assets
27
+ run : npm run build
28
+
29
+ - name : Upload to cdn-dev.w3.org bucket
30
+ if : success()
31
+ env :
32
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
33
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
34
+ AWS_REGION : ' us-east-1'
35
+ run :
36
+ aws s3 sync --no-progress ${{ env.source }} s3://cdn-dev.w3.org/${{ env.destination }}
Original file line number Diff line number Diff line change
1
+ on :
2
+ pull_request :
3
+ types :
4
+ - closed
5
+
6
+ jobs :
7
+ delete_assets :
8
+ runs-on : ubuntu-latest
9
+ env :
10
+ destination : assets/website-2021-dev/pr-${{ github.event.number }}/
11
+ steps :
12
+ - name : Delete PR assets from the cdn-dev.w3.org bucket
13
+ if : success()
14
+ env :
15
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
16
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
17
+ AWS_REGION : ' us-east-1'
18
+ run :
19
+ aws s3 rm --recursive s3://cdn-dev.w3.org/${{ env.destination }}
You can’t perform that action at this time.
0 commit comments