Skip to content

Commit 9862016

Browse files
authored
Create publish.yml
I have used the documentation (https://quarto.org/docs/publishing/quarto-pub.html#github-action) to create the publish.yml file. Will need to get the Quarto Pub credentials. I'm unable to test on my local machine using this command as I keep getting this error for quarto publish quarto-pub: ERROR: MissingEnvVarsError: The following variables were defined in the example file but are not present in the environment: SECRET_KEY, BASE_URL, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME, RESEND_API_KEY Make sure to add them to your env file. If you expect any of these variables to be empty, you can set the allowEmptyValues option to true. Stack trace: SECRET_KEY, BASE_URL, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME, RESEND_API_KEY Make sure to add them to your env file. If you expect any of these variables to be empty, you can set the allowEmptyValues option to true. at assertSafe (file:///opt/quarto/bin/quarto.js:26186:15) at load3 (file:///opt/quarto/bin/quarto.js:26147:9) at eventLoopTick (ext:core/01_core.js:153:7) at async dotenvQuartoProfile (file:///opt/quarto/bin/quarto.js:26288:18) at async initializeProfileConfig (file:///opt/quarto/bin/quarto.js:26353:46) at async projectContext (file:///opt/quarto/bin/quarto.js:73559:29) at async createPublishOptions (file:///opt/quarto/bin/quarto.js:109627:21) at async publishAction (file:///opt/quarto/bin/quarto.js:109548:28) at async Command.actionHandler (file:///opt/quarto/bin/quarto.js:109543:9) at async Command.execute (file:///opt/quarto/bin/quarto.js:8017:13)
1 parent ec938e5 commit 9862016

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
branches: main
5+
6+
name: Quarto Publish
7+
8+
jobs:
9+
build-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Quarto
16+
uses: quarto-dev/quarto-actions/setup@v2
17+
18+
- name: Render and Publish
19+
uses: quarto-dev/quarto-actions/publish@v2
20+
with:
21+
target: quarto-pub
22+
QUARTO_PUB_AUTH_TOKEN: ${{ secrets.QUARTO_PUB_AUTH_TOKEN }}
23+
24+
# - name: Traditionally Render & Publish
25+
# run: |
26+
# quarto publish
27+
# quarto render index.qmd --output-dir . --output README.md --to gfm
28+
# unlink index.html # Can skip this step if we add/commit/push only the README rather than all changed files

0 commit comments

Comments
 (0)