Add generated files to artifact for use between jobs

This commit is contained in:
Joey Hafner 2024-08-08 10:31:36 -07:00
parent a18cfab6ce
commit 39976b58b5
No known key found for this signature in database

View File

@ -57,10 +57,15 @@ jobs:
--gc \ --gc \
--minify \ --minify \
--baseURL "https://jafner.dev/" --baseURL "https://jafner.dev/"
- name: Upload artifact - name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3
with: with:
path: 'sites/Jafner.dev/public' path: 'sites/Jafner.dev/public'
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: jafner-dev-generated
path: 'sites/Jafner.dev/public'
deploy-github-pages: deploy-github-pages:
environment: environment:
@ -80,6 +85,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: jafner-dev-generated
- name: Authenticate AWS CLI - name: Authenticate AWS CLI
uses: aws-actions/configure-aws-credentials@v1 uses: aws-actions/configure-aws-credentials@v1
with: with:
@ -88,4 +97,4 @@ jobs:
aws-region: us-west-2 aws-region: us-west-2
- name: Push generated files to jafner-dev bucket - name: Push generated files to jafner-dev bucket
run: | run: |
aws s3 sync sites/Jafner.dev/public s3://jafner-dev --delete aws s3 sync sites/Jafner.dev/public s3://jafner-dev --delete