From 05642bec949d4cfe3c482c5661ba8553e379b6a5 Mon Sep 17 00:00:00 2001
From: Kelvin Rodriguez <krodriguez@usgs.gov>
Date: Tue, 26 Dec 2023 16:16:20 -0700
Subject: [PATCH] added deploy step for docs

---
 .github/{ => workflows}/ctests.yml |  0
 .github/{ => workflows}/deploy.yml | 23 ++++++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
 rename .github/{ => workflows}/ctests.yml (100%)
 rename .github/{ => workflows}/deploy.yml (51%)

diff --git a/.github/ctests.yml b/.github/workflows/ctests.yml
similarity index 100%
rename from .github/ctests.yml
rename to .github/workflows/ctests.yml
diff --git a/.github/deploy.yml b/.github/workflows/deploy.yml
similarity index 51%
rename from .github/deploy.yml
rename to .github/workflows/deploy.yml
index 58ed65e..9dc1e6a 100644
--- a/.github/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -9,7 +9,7 @@ env:
   ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
 
 jobs:
-  deploy-build:
+  anaconda-deploy:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
@@ -32,3 +32,24 @@ jobs:
     - name: Build tarbll
       run: |
           conda build --user usgs-astrogeology --label dev -c conda-forge -c tudat-team recipe/
+
+  aws-docs-deploy:
+    if: ${{ github.event.workflow_run.conclusion == 'success' }}
+    runs-on: ubuntu-latest
+    defaults:
+      run:
+        shell: bash -el {0}
+    steps:            
+      - name: Set AWS credentials for upload
+        uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83
+        with:
+          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
+          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+          aws-region: us-west-2
+  
+      - name: Upload to S3
+        working-directory: ${{github.workspace}}/install
+        run: |
+          ls -l share/doc/SpiceQL/sphinx/
+          aws s3 sync --delete share/doc/SpiceQL/sphinx/ s3://asc-public-docs/software_manuals/spiceql/
+          
\ No newline at end of file
-- 
GitLab