Skip to content

Commit

Permalink
fixing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mayo committed Sep 2, 2024
1 parent 2d3c0bd commit 754524b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
- name: Build site tools
run: cd tools/deploy_aws_s3 && cargo build --verbose

- name: Tar site tools
run: tar -C tools/deploy_aws_s3/debug -cvf deploy_aws_s3.tar deploy_aws_s3

- name: Save tools artifact
uses: actions/upload-artifact@v4
with:
name: deploy_aws_s3
path: deploy_aws_s3.tar

- name: Build site
run: make build

Expand All @@ -34,12 +43,6 @@ jobs:
name: website-${{ github.ref_name }}
path: public/

- name: Save tools artifact
uses: actions/upload-artifact@v4
with:
name: deploy_aws_s3
path: tools/deploy_aws_s3/target/*/deploy_aws_s3

call-deploy-workflow:
uses: ./.github/workflows/deploy.yml
needs: build
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ jobs:
uses: actions/download-artifact@v4
with:
name: deploy_aws_s3
path: tools/deploy_aws_s3
path: deploy_aws_s3.tar

- name: Extract tools artifact
run: tar -xvf deploy_aws_s3.tar

- name: Setup Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -46,7 +49,7 @@ jobs:

- name: Upload website to S3
#run: aws s3 sync --acl public-read --delete public/ s3://${{ env.S3_BUCKET }}/
run: tools/deploy_aws_s3/debug/deploy_aws_s3 --bucket ${{ env.S3_BUCKET }} public/ -v -a public-read -d
run: deploy_aws_s3 --bucket ${{ env.S3_BUCKET }} public/ -v -a public-read -d

# invalidate-cache:
# runs-on: ubuntu-latest
Expand Down

0 comments on commit 754524b

Please sign in to comment.