mirror of
https://github.com/ivabus/www
synced 2024-11-10 14:45:14 +03:00
Merge pull request #132 from teaxyz/ops/optimize-gha-workflows
optimize GHA workflow by folder changes
This commit is contained in:
commit
60153f1d77
28
.github/workflows/staging.yml
vendored
28
.github/workflows/staging.yml
vendored
|
@ -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
|
||||
|
|
|
@ -39,6 +39,7 @@ interface FinalPackageOutput {
|
|||
interface AirtablePackageDict {
|
||||
[slug: string]: AirtablePackage
|
||||
}
|
||||
|
||||
const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: AirtablePackage[]): Promise<FinalPackageOutput> => {
|
||||
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;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
position:relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<section class="hero-section">
|
||||
|
|
Loading…
Reference in a new issue