-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d423430
commit 1f102ea
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |