Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add Github action workflow #11

Merged
merged 9 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
id-token: write

jobs:
build:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
Expand All @@ -24,12 +24,12 @@ jobs:
with:
node-version: 18

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/GitHubAction-AssumeRoleWithAction
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ vars.AWS_REGION }}

- uses: oven-sh/setup-bun@v1
- name: Install dependencies
Expand All @@ -39,3 +39,7 @@ jobs:

- name: Deploy to S3
run: aws s3 sync ./dist/ s3://${{ secrets.BUCKET_ID }}

- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/developers/*"
19 changes: 13 additions & 6 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,24 @@ on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

permissions:
contents: read
pages: write
id-token: write

jobs:
test-deploy:
name: Test deployment
build:
name: Test build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- name: Checkout your repository using git
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Test build website
Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"dependencies": {
"@astrojs/react": "^3.0.2",
"@astrojs/starlight": "^0.10.2",
"@astrojs/starlight": "^0.10.3",
"@interledger/docs-design-system": "^0.0.12",
"@types/react": "^18.2.23",
"@types/react": "^18.2.24",
"@types/react-dom": "^18.2.8",
"astro": "^3.2.0",
"react": "^18.2.0",
Expand Down