serverless/.github/workflows/publish-docs.yml
Matthieu Napoli f09bb173b4 docs: Publish the new menu only on the main branch
Testing was successful in GitHub Actions, let's remove the test branch.
2022-05-02 13:21:40 +02:00

21 lines
648 B
YAML

# main only
name: Publish docs
on:
push:
branches: [main]
jobs:
docs-menu:
name: Publish the docs menu
runs-on: ubuntu-latest
timeout-minutes: 3 # Default is 360
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_ASSETS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_ASSETS_AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v2
# Upload menu.json with a cache of 60 seconds (instead of the default 24h on the CloudFront distribution)
- run: 'aws s3 cp docs/menu.json s3://assets.public.serverless/website/framework/docs/menu.json --cache-control max-age=60 --region us-east-2'