diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 6781a82..315e43a 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -9,10 +9,33 @@ env: AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} jobs: - deploy_sls: + validation: + runs-on: ubuntu-latest + outputs: + website: ${{steps.website.outputs.src}} + lambdas: ${{steps.lambdas.outputs.lambdas}} + steps: + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: website + with: + filters: | + src: + - 'src/**' + - uses: dorny/paths-filter@v2 + id: lambdas + with: + filters: | + lambdas: + - 'lambdas/**' + + serverless: + needs: validation + if: needs.validation.outputs.lambdas == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -30,6 +53,8 @@ jobs: entrypoint: /bin/sh deploy: + needs: validation + if: needs.validation.outputs.website == 'true' runs-on: ubuntu-latest steps: - name: inject slug/short variables @@ -72,7 +97,6 @@ jobs: with: cmd: '.github/prepare-thumb-images.sh src/data/packages.json ./src/static/Images/packages/' - - run: .github/mk-pantry-accessible.sh ${{ secrets.TEMP_JACOBS_GITHUB_PAT }} - uses: teaxyz/setup@v0 diff --git a/lambdas/src/functions/buildPackages/handler.ts b/lambdas/src/functions/buildPackages/handler.ts index e2af809..de42f4a 100644 --- a/lambdas/src/functions/buildPackages/handler.ts +++ b/lambdas/src/functions/buildPackages/handler.ts @@ -39,6 +39,7 @@ interface FinalPackageOutput { interface AirtablePackageDict { [slug: string]: AirtablePackage } + const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: AirtablePackage[]): Promise => { const newPackages: NewAirtablePackage[] = []; const packagesJson: Package[] = []; @@ -75,6 +76,7 @@ const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: A homepage, desc, installs: 0, // TODO: get from algolia + dl_count: 0, thumb_image_url: '', } newPackages.push(newPackage); @@ -88,5 +90,4 @@ const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: A } } - export const main = buildPackages; diff --git a/src/layouts/index.html b/src/layouts/index.html index b2c0c19..8353688 100644 --- a/src/layouts/index.html +++ b/src/layouts/index.html @@ -20,7 +20,6 @@ position:relative; z-index: 2; } -