mirror of
https://github.com/ivabus/www
synced 2024-11-22 23:15:08 +03:00
test gha optimization
This commit is contained in:
parent
890d857c50
commit
b5626af876
1 changed files with 29 additions and 2 deletions
31
.github/workflows/staging.yml
vendored
31
.github/workflows/staging.yml
vendored
|
@ -9,10 +9,30 @@ env:
|
||||||
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
|
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy_sls:
|
validation:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- 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/**'
|
||||||
|
|
||||||
|
deploy_sls:
|
||||||
|
needs: validation
|
||||||
|
if: steps.lambdas.outputs.lambdas == 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- 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 +50,8 @@ jobs:
|
||||||
entrypoint: /bin/sh
|
entrypoint: /bin/sh
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
needs: validation
|
||||||
|
if: steps.website.outputs.src == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: inject slug/short variables
|
- name: inject slug/short variables
|
||||||
|
@ -47,6 +69,12 @@ jobs:
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: dorny/paths-filter@v2
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
src:
|
||||||
|
- 'src/**'
|
||||||
|
|
||||||
- name: Apply Staging Configuration
|
- name: Apply Staging Configuration
|
||||||
run: |
|
run: |
|
||||||
|
@ -72,7 +100,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
|
||||||
|
|
Loading…
Reference in a new issue