mirror of
https://github.com/scratchfoundation/scratchjr-website.git
synced 2025-06-30 00:40:21 -04:00
ci: update codeowners file
add gha deploy.yml
This commit is contained in:
parent
42ccab57bd
commit
ae6e49b876
3 changed files with 37 additions and 0 deletions
1
.github/CODEOWNERS.md
vendored
Normal file
1
.github/CODEOWNERS.md
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
@scratchfoundation/scratch-engineering
|
32
.github/workflows/deploy.yml
vendored
Normal file
32
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
name: Build and Deploy ScratchJr Website
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: write
|
||||||
|
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Use Node 17x
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '17.x'
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: npm install --legacy-peer-deps
|
||||||
|
- name: Lint Site Code
|
||||||
|
run: npm run test
|
||||||
|
- name: Build Site
|
||||||
|
run: npm run build
|
||||||
|
- name: Configure AWS Credentials
|
||||||
|
uses: aws-actions/configure-aws-credentials@v4
|
||||||
|
with:
|
||||||
|
role-to-assume: ${{ secrets.AWS_OIDC_ROLE }}
|
||||||
|
role-session-name: GitHub-Action-Role
|
||||||
|
aws-region: ${{ vars.AWS_REGION }}
|
||||||
|
- name: Upload to S3
|
||||||
|
run: |
|
||||||
|
aws s3 sync ./build s3://${{ vars.AWS_S3_BUCKET }}/junior/
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -9,3 +9,7 @@ npm-*
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
/build
|
/build
|
||||||
|
|
||||||
|
# act
|
||||||
|
.secrets
|
||||||
|
.env
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue