Merge pull request #2368 from dxc-technology/PelayoFelgueroso/improve… #541
This file contains hidden or 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
| name: Publish Website | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - "apps/website/**" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Install Node.js 22.x | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 22.x | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-west-2 | |
| role-to-assume: ${{ secrets.AWS_ROLE_SANDBOX }} | |
| role-duration-seconds: 3600 | |
| role-skip-session-tagging: true | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build library and website | |
| env: | |
| NEXT_PUBLIC_SITE_VERSION: next | |
| run: npm run build | |
| - name: Move website to S3 | |
| run: | | |
| aws s3 rm s3://design-system-react-cdk-site/halstack/next/ --recursive | |
| aws s3 cp ./apps/website/out/ s3://design-system-react-cdk-site/halstack/next/ --recursive |