-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 1.05 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
on:
push:
branches:
- main
jobs:
build:
name: Build & Deploy
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn install --frozen-lockfile
# - name: Lint
# run: yarn lint
- name: Replace SHA in code
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "##REPLACE_GITHUB_COMMIT_SHA_HERE##"
replace: "${{ github.sha }}"
regex: false
include: "src/components/general/Footer.astro"
- name: Generate build
run: yarn build
- name: Deploy to S3
uses: reggionick/s3-deploy@v3
with:
folder: dist
bucket: ${{ secrets.S3_BUCKET }}
bucket-region: eu-west-2
private: true
cache: 86400
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}