Skip to content

ci: fix 2

ci: fix 2 #4

Workflow file for this run

name: NET42.run website
on:
push:
branches: [main]
paths:
- "packages/client/**"
- ".github/**"
workflow_dispatch:
env:
AWS_REGION: ap-south-1
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-client-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-client-
- name: Install dependencies
shell: bash
working-directory: ./packages/client
run: |
pnpm --ignore-workspace install
- 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: ${{ env.AWS_REGION }}
- name: Build Website
working-directory: ./packages/client
run: pnpm build:staging
- name: Push data to S3
working-directory: ./packages/client
run: aws s3 sync dist/ s3://net42.run/ --acl public-read