mirror of
https://github.com/ivabus/www
synced 2024-11-10 15:55: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 }}
|
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
|
||||||
|
|
||||||
jobs:
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: aws-actions/configure-aws-credentials@v1
|
- uses: aws-actions/configure-aws-credentials@v1
|
||||||
with:
|
with:
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
@ -30,6 +53,8 @@ jobs:
|
||||||
entrypoint: /bin/sh
|
entrypoint: /bin/sh
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
needs: validation
|
||||||
|
if: needs.validation.outputs.website == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: inject slug/short variables
|
- name: inject slug/short variables
|
||||||
|
@ -72,7 +97,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
cmd: '.github/prepare-thumb-images.sh src/data/packages.json ./src/static/Images/packages/'
|
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 }}
|
- run: .github/mk-pantry-accessible.sh ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
|
||||||
|
|
||||||
- uses: teaxyz/setup@v0
|
- uses: teaxyz/setup@v0
|
||||||
|
|
|
@ -39,6 +39,7 @@ interface FinalPackageOutput {
|
||||||
interface AirtablePackageDict {
|
interface AirtablePackageDict {
|
||||||
[slug: string]: AirtablePackage
|
[slug: string]: AirtablePackage
|
||||||
}
|
}
|
||||||
|
|
||||||
const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: AirtablePackage[]): Promise<FinalPackageOutput> => {
|
const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: AirtablePackage[]): Promise<FinalPackageOutput> => {
|
||||||
const newPackages: NewAirtablePackage[] = [];
|
const newPackages: NewAirtablePackage[] = [];
|
||||||
const packagesJson: Package[] = [];
|
const packagesJson: Package[] = [];
|
||||||
|
@ -75,6 +76,7 @@ const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: A
|
||||||
homepage,
|
homepage,
|
||||||
desc,
|
desc,
|
||||||
installs: 0, // TODO: get from algolia
|
installs: 0, // TODO: get from algolia
|
||||||
|
dl_count: 0,
|
||||||
thumb_image_url: '',
|
thumb_image_url: '',
|
||||||
}
|
}
|
||||||
newPackages.push(newPackage);
|
newPackages.push(newPackage);
|
||||||
|
@ -88,5 +90,4 @@ const getFinalPackagesData = async (s3Packages: S3Package[], airtablePackages: A
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const main = buildPackages;
|
export const main = buildPackages;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
position:relative;
|
position:relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<section class="hero-section">
|
<section class="hero-section">
|
||||||
|
|
Loading…
Reference in a new issue