File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Knative Tutorial Site
1+ name : Knative Tutorial
22
33on :
44 push :
55 branches :
6- - master
6+ - release/0.7.x
77env :
88 SITE_DIR : ' gh-pages'
99jobs :
1616 - name : " Generate site using antora site action"
1717 uses : kameshsampath/antora-site-action@master
1818 with :
19- antora_playbook : staging .yaml
19+ antora_playbook : site .yaml
2020 - name : " List folder"
2121 run : |
2222 ls -ltr $GITHUB_WORKSPACE/
Original file line number Diff line number Diff line change 1+ name : Knative Tutorial Staging
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ env :
8+ SITE_DIR : ' gh-pages'
9+ jobs :
10+ build_site :
11+ name : " Build site with Antora"
12+ runs-on : [ubuntu-latest]
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v2
16+ - name : " Generate site using antora site action"
17+ uses : kameshsampath/antora-site-action@master
18+ with :
19+ antora_playbook : staging.yaml
20+ - name : " List folder"
21+ run : |
22+ ls -ltr $GITHUB_WORKSPACE/
23+ - name : " Upload generated site"
24+ uses : actions/upload-artifact@v1.0.0
25+ with :
26+ name : site
27+ path : " ${{ github.workspace }}/${{ env.SITE_DIR }}"
28+ deploy_site :
29+ runs-on : [ubuntu-latest]
30+ needs : [build_site]
31+ name : " Deploy to Staging"
32+ steps :
33+ - name : Checkout
34+ uses : actions/checkout@v2
35+ with :
36+ repository : ' https://github.com/redhat-developer-docs/knative-tutorial-staging'
37+ token : " ${{ env.GITHUB_TOKEN }}"
38+ - name : Download generated site
39+ uses : actions/download-artifact@v1
40+ with :
41+ name : site
42+ path : " ${{ github.workspace }}/${{ env.SITE_DIR }}"
43+ - name : Deploy to GitHub Pages
44+ uses : JamesIves/github-pages-deploy-action@3.2.1
45+ with :
46+ GITHUB_TOKEN : " ${{ secrets.KNATIVE_TUTORIAL_STAGING}}"
47+ FOLDER : " ${{ env.SITE_DIR }}"
48+ BRANCH : ' gh-pages'
49+ COMMIT_MESSAGE : " [Staging] Publish Documentation for ${{ github.sha }}"
You can’t perform that action at this time.
0 commit comments