Skip to content

Commit

Permalink
Deploy on S3
Browse files Browse the repository at this point in the history
  • Loading branch information
clementduveau committed Oct 19, 2024
1 parent d423430 commit 1f102ea
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Deploy to S3

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'yarn'

- name: Get modules
run: yarn install

- name: Build
run: yarn build

- name: Set up AWS CLI
uses: aws-actions/setup-cli@v1

- name: Configure AWS CLI for S3-compatible endpoint
run: |
aws configure set aws_access_key_id ${{ secrets.S3_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.S3_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ secrets.S3_REGION }}
aws configure set default.s3.endpoint_url ${{ secrets.S3_ENDPOINT_URL }}
- name: Deploy to Scaleway
run: |
aws s3 sync ./public s3://stock-options --endpoint-url ${{ secrets.S3_ENDPOINT_URL }}

0 comments on commit 1f102ea

Please sign in to comment.