Skip to content

Commit 28a3ff3

Browse files
replace publishing of the test object with actual docusaurus build
I've used `sync` instead of `cp`, because it only does the copying, when file doesn't exist yet or wasn't modified. The `--delete` flag also takes care of deleting files that are not present anymore.
1 parent fe3bea2 commit 28a3ff3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/publish.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ jobs:
3535
uses: actions/setup-node@v3
3636
with:
3737
node-version: '20'
38-
- name: Publish test object to S3
39-
run: |
40-
echo "<h1>This is a test file generated by ${{ github.workflow }}-${{ github.run_id}}</h1>" > test.html
41-
aws s3 cp test.html s3://$S3_BUCKET_NAME/test.html
38+
- name: Install dependencies
39+
run: npm ci
40+
- name: Build Docusaurus site
41+
run: npm run build
42+
- name: Sync build artifacts to S3
43+
run: aws s3 sync ./build/ s3://$S3_BUCKET_NAME --delete
4244
- name: Invalidate CloudFront Cache
4345
run: |
4446
aws cloudfront create-invalidation --distribution-id ${CF_DISTRIBUTION_ID} --paths "/*"

0 commit comments

Comments
 (0)