-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from NASA-Openscapes/deploy-preview
Add deploy preview
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: | ||
# workflow_dispatch allows deploy preview by pushing button on GitHub | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
|
||
name: Deploy Preview | ||
|
||
jobs: | ||
build-deploy-preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Render | ||
uses: quarto-dev/quarto-actions/render@v2 | ||
with: | ||
to: html | ||
|
||
- name: Deploy Preview to Netlify as preview | ||
id: netlify-deploy | ||
uses: nwtgck/actions-netlify@v3 | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ba5ad61a-3dae-4e81-8b9a-de27c5e495f5 | ||
with: | ||
publish-dir: './_site' | ||
production-deploy: false | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: | ||
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})' | ||
alias: deploy-preview-${{ github.event.number }} | ||
# these all default to 'true' | ||
enable-pull-request-comment: true | ||
enable-commit-comment: false | ||
enable-commit-status: true | ||
overwrites-pull-request-comment: false | ||
timeout-minutes: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters