-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (34 loc) · 1.68 KB
/
deploy.yml
File metadata and controls
41 lines (34 loc) · 1.68 KB
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
name: Deploy
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Prettify links
run: |
cp index.html index-orig.html
find . -type f -name '*.html' -exec sed -i 's/index.html/\//' {} \;
find . -type f -name '*.html' -exec sed -i 's/contact.html/contact/' {} \;
find . -type f -name '*.html' -exec sed -i 's/about.html/about/' {} \;
find . -type f -name '*.html' -exec sed -i 's/schools.html/schools/' {} \;
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Prettify links
run: |
aws s3 cp index.html s3://rovercode-landing-page/index.html --content-type "text/html" --acl public-read-write
aws s3 cp about.html s3://rovercode-landing-page/about --content-type "text/html" --acl public-read-write
aws s3 cp contact.html s3://rovercode-landing-page/contact --content-type "text/html" --acl public-read-write
aws s3 cp schools.html s3://rovercode-landing-page/schools --content-type "text/html" --acl public-read-write
aws s3 cp assets s3://rovercode-landing-page/assets/ --recursive --acl public-read-write
aws s3 cp index.js s3://rovercode-landing-page --acl public-read-write
aws s3 cp index.css s3://rovercode-landing-page --acl public-read-write