Skip to content

Merge pull request #142 from nolanderc/patch-1 #39

Merge pull request #142 from nolanderc/patch-1

Merge pull request #142 from nolanderc/patch-1 #39

Workflow file for this run

name: Build
on:
push:
jobs:
www-deploy:
name: "www static -> s3"
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Check out the source code
uses: actions/checkout@v2
with:
lfs: true
submodules: recursive
- name: Checkout LFS objects
run: git lfs checkout
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Display python version
run: python -c "import sys; print(sys.version)"
- name: Compile docs.gl
run: python3 compile.py --full
- 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-west-2
- run: aws s3 sync htdocs s3://docs.gl --delete --content-type text/html
- run: aws s3 cp s3://docs.gl/ s3://docs.gl/ --exclude '*' --include '*.zip' --no-guess-mime-type --content-type="application/zip" --metadata-directive="REPLACE" --recursive
- run: aws s3 cp s3://docs.gl/ s3://docs.gl/ --exclude '*' --include '*.js' --no-guess-mime-type --content-type="text/js" --metadata-directive="REPLACE" --recursive
- run: aws s3 cp s3://docs.gl/ s3://docs.gl/ --exclude '*' --include '*.xml' --no-guess-mime-type --content-type="text/xml" --metadata-directive="REPLACE" --recursive
- run: aws s3 cp s3://docs.gl/ s3://docs.gl/ --exclude '*' --include '*.css' --no-guess-mime-type --content-type="text/css" --metadata-directive="REPLACE" --recursive
- run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DOCSGL_DISTRIBUTION_ID }} --paths /*