Merge pull request #124 from f5devcentral/dev #166
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: Build the Docs | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
S3_DIR: training/community/f5xc-emea-workshop/html | |
steps: | |
- uses: actions/checkout@v2 | |
- run: ./containthedocs-build.sh | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Copy files to s3 (Staging Clouddocs) | |
if: | |
github.ref == 'refs/heads/dev' | |
run: | | |
aws s3 sync --delete $PWD/docs/_build/html/ s3://clouddocs.f5networks.net/$S3_DIR/ | |
- name: Copy files to s3 (Production Clouddocs) | |
if: | |
github.ref == 'refs/heads/main' | |
run: | | |
aws s3 sync --delete $PWD/docs/_build/html/ s3://clouddocs.f5.com/$S3_DIR/ |