Skip to content

Commit

Permalink
Merge pull request #360 from scratchfoundation/rd/move-sjr-website-to…
Browse files Browse the repository at this point in the history
…-gha

Move SJR Website to GitHub Actions
  • Loading branch information
Ron de las Alas authored Oct 6, 2023
2 parents 409117a + 1399274 commit ab05a21
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 69 deletions.
69 changes: 0 additions & 69 deletions .circleci/config.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/CODEOWNERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@scratchfoundation/scratch-engineering
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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 ci --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 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ npm-*

# Build
/build

# act
.secrets
.env

0 comments on commit ab05a21

Please sign in to comment.