-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.38 KB
/
main.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
39
40
41
42
43
44
name: Main
on:
push:
branches: [main]
defaults:
run:
working-directory: c182rg-improvement-project
permissions:
id-token: write
contents: read
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: set up node.js
uses: actions/setup-node@v1
with:
node-version: 20
- name: install dependencies
run: npm ci
- name: build code
run: npm run build
- name: include docs
run: Copy-Item -Path docs\README.txt -Destination README.txt
- name: rename build folder
run: Rename-Item -Path build -NewName c182rg-improvement-project
- name: package code
run: Compress-Archive -Path c182rg-improvement-project -DestinationPath c182rg-improvement-project.zip
- name: package docs
run: Compress-Archive -Path README.txt -Update -DestinationPath c182rg-improvement-project.zip
- name: assume-github-actions-role
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.PROJECTS_BUCKET_LIVE_UPLOAD_ROLE_ARN }}
aws-region: eu-west-1
- name: deploy
run: aws s3 cp c182rg-improvement-project.zip s3://projects-live-bucket-bucket-x5u4945s2wzh/c182rg-improvement-project/development/c182rg-improvement-project.zip --cache-control max-age=60