Skip to content

Commit 5a4143d

Browse files
authored
setup for GitHub Enterprise (#60)
fix #40
1 parent 88d15e4 commit 5a4143d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

setup/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ We recommend using a Linux or MacOS runner if possible, especially if TinyTeX is
3939
tinytex: true
4040
```
4141

42+
### GitHub Enterprise
43+
44+
For GitHub Enterprise Server (GHES), you may need to [generate a personal access token (PAT) on github.com](https://github.com/settings/tokens/new) to enable downloading Quarto. GitHub's [setup-python action](https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#avoiding-rate-limit-issues) uses a similar workaround, from which these instructions are adapted:
45+
46+
- Create a PAT on any github.com account by using [this link](https://github.com/settings/tokens/new) after logging into github.com (not your GHES instance). This PAT does not need any rights, so make sure all the boxes are unchecked.
47+
- Store this PAT in the repository / organization where you run your workflow, e.g. as `GH_GITHUB_COM_TOKEN`. You can do this by navigating to your repository -> **Settings** -> **Secrets** -> **Actions** -> **New repository secret**.
48+
- In your workflow, incorporate your PAT as an environment variable. For example:
49+
50+
```yaml
51+
- name: Set up Quarto
52+
uses: quarto-dev/quarto-actions/setup@v2
53+
env:
54+
GH_TOKEN: ${{ secrets.GH_GITHUB_COM_TOKEN }}
55+
```
56+
4257
## Examples
4358

4459
```yaml

setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runs:
4343
# On Windows scoop will be used so no need to download the release
4444
if [ -z "${{inputs.version}}" ]; then
4545
# download the latest stable release
46-
gh release download --repo quarto-dev/quarto-cli --pattern ${{ format('*{0}', env.BUNDLE_EXT) }}
46+
gh release download --repo github.com/quarto-dev/quarto-cli --pattern ${{ format('*{0}', env.BUNDLE_EXT) }}
4747
version=$(curl https://quarto.org/docs/download/_download.json | jq -r '.version')
4848
echo "version=${version}" >> $GITHUB_OUTPUT
4949
elif [ "${{inputs.version}}" == "LATEST" -o "${{inputs.version}}" == "pre-release" ]; then

0 commit comments

Comments
 (0)