update-index #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update-index | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- release-offline-installer, release-online-installer, release-espressif-ide-installer | |
types: [closed] | |
jobs: | |
update-index: | |
name: Update index.html | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Link Checker | |
uses: lycheeverse/lychee-action@v1.4.1 | |
with: | |
args: --verbose --no-progress './README.md' | |
fail: true | |
- name: Upload index.html To dl.espressif.com | |
id: upload-index-espressif | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
run: | | |
aws s3 cp --acl=public-read --no-progress ./src/Resources/download/index.html s3://${{ secrets.DL_BUCKET }}/dl/esp-idf/index.html | |
aws s3 cp --acl=public-read --no-progress ./src/Resources/download/releases.json s3://${{ secrets.DL_BUCKET }}/dl/esp-idf/releases.json | |
- name: Invalidate cache | |
id: invalidate-index-cache | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
run: | | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.DL_DISTRIBUTION_ID }} --paths "/dl/esp-idf/index.html" "/dl/esp-idf/" "/dl/esp-idf/releases.json" | |