generated from ibm-client-engineering/solution-template-quarto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (45 loc) · 1.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
language: python
python:
- "3.9"
branches:
only:
- main
# env:
# - GITHUB_TOKEN: $secrets.GITHUB_TOKEN
jobs:
include:
- stage: build and deploy pages
before_install:
- rm ~/.netrc
install:
- pip install quarto-cli
script:
- quarto render --output-dir build
# script:
# - quarto publish gh-pages --no-prompt --no-browser --token $GITHUB_TOKEN
before_deploy:
- rvm --default use 2.7.6
deploy:
- provider: pages
edge:
branch: v1.10.16
github_url: github.ibm.com
github_token: $GITHUB_TOKEN
target_branch: gh-pages
skip_cleanup: true
local_dir: build
on:
branch: main
- stage: sync to public
if: type != pull_request
before_install:
- export GITHUB_PUB_URI=$(echo $GITHUB_PUBLIC | sed "s/\/github.com\//\/$PUBLIC_TOKEN\@github.com\//")
- export GITHUB_ENTERPRISE=$(echo $GITHUB_PUBLIC | sed "s/\/github.com\//\/$GITHUB_TOKEN\@github.ibm.com\//")
- git clone $GITHUB_ENTERPRISE /tmp/repo
- cd /tmp/repo
script:
- git remote set-url origin $GITHUB_PUB_URI
- git push origin main --force
stages:
- build and deploy pages
- sync to public