Skip to content

Commit 1e5764a

Browse files
authored
Use Netfliy CLI for previews (#182)
1 parent 0dc77a5 commit 1e5764a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/preview.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,30 @@ jobs:
3939
run: yarn build
4040

4141
- name: Deploy to Netlify
42-
uses: jsmrcaga/[email protected]
43-
with:
42+
env:
4443
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
4544
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
46-
build_directory: build
47-
install_command: "echo Skipping installing the dependencies"
48-
build_command: "echo Skipping building the web files"
49-
deploy_alias: preview-${{ github.event.pull_request.number }}
45+
run: |
46+
netlify deploy \
47+
--dir=build \
48+
--no-build \
49+
--auth=$NETLIFY_AUTH_TOKEN \
50+
--site=$NETLIFY_SITE_ID \
51+
--alias=preview-${{ github.event.pull_request.number }} \
52+
--message="Preview Deploy from GitHub Actions"
5053
5154
- name: "Update PR"
52-
if: ${{ env.NETLIFY_PREVIEW_URL }}
55+
if: success()
5356
uses: thollander/actions-comment-pull-request@v2
5457
with:
5558
message: |
5659
:rocket: **Build success!**
5760
58-
Latest successful preview: ${{ env.NETLIFY_PREVIEW_URL }}
61+
Latest successful preview: https://preview-${{ github.event.pull_request.number }}--questdb-documentation.netlify.app
5962
6063
Commit SHA: ${{ github.event.pull_request.head.sha }}
6164
6265
> :package: Build generates a preview & updates link on each commit.
63-
comment_tag: preview
6466
6567
validate-links:
6668
name: "Validate broken links"

0 commit comments

Comments
 (0)