Skip to content

Commit

Permalink
Test github pages deployment #2
Browse files Browse the repository at this point in the history
  • Loading branch information
fongsean committed May 14, 2024
1 parent 0c2022b commit dbe6d85
Show file tree
Hide file tree
Showing 5 changed files with 30,708 additions and 14,581 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
name: Deploy to S3
name: Deploy Smart Forms app to S3
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down Expand Up @@ -41,5 +41,5 @@ jobs:
# npx sentry-cli releases set-commits $VERSION --local --ignore-empty --ignore-missing && \
# npx sentry-cli releases files $VERSION upload-sourcemaps build

- name: Upload benchmark file to S3
- name: Upload static React site to S3
run: aws s3 sync apps/smart-forms-app/dist s3://smart-forms-react-app/
41 changes: 28 additions & 13 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
push:
# branches: [ "main" ]


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

jobs:
deploy-docusaurus:
name: Deploy Docusaurus to GitHub Pages
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
Expand Down Expand Up @@ -39,15 +39,30 @@ jobs:
uses: actions/deploy-pages@v4


# deploy-storybook:
# environment:
# name: github-pages
# url: ${{ steps.build-publish.outputs.page_url }}
#
# runs-on: ubuntu-latest
# steps:
# - uses: bitovi/[email protected]
# with:
# path: packages/smart-forms-renderer/storybook-static
# install_command: npm ci
# build_command: npm run build-storybook -w packages/smart-forms-renderer
deploy-storybook:
name: Deploy Storybook to S3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: 16
cache: npm

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::209248795938:role/SmartFormsReactAppDeployment
aws-region: ap-southeast-2

- name: Install dependencies
run: npm ci

- name: Build application
run:
npm run build-storybook -w packages/smart-forms-renderer

- name: Upload static Storybook site to S3
run: aws s3 sync packages/smart-forms-renderer/storybook-static s3://smart-forms-storybook/storybook
Loading

0 comments on commit dbe6d85

Please sign in to comment.