Skip to content

Commit c600632

Browse files
committed
using gh-pages
1 parent 1cac1de commit c600632

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

.github/workflows/staging.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,29 @@ jobs:
3636
repository: redhat-developer-docs/knative-tutorial-staging
3737
ref: 'gh-pages'
3838
path: knative-tutorial-staging
39-
- name: "List folder"
40-
run: |
41-
ls -ltr $GITHUB_WORKSPACE/
39+
- name: Install SSH Client
40+
uses: webfactory/ssh-agent@v0.2.0
41+
with:
42+
ssh-private-key: ${{ secrets.KNATIVE_TUTORIAL_STAGING }}
4243
- name: Download generated site
4344
uses: actions/download-artifact@v1
4445
with:
4546
name: site
4647
path: "${{ github.workspace }}/knative-tutorial-staging/${{ env.SITE_DIR }}"
4748
- name: Deploy to GitHub Pages
48-
working-directory: "${{ github.workspace }}/knative-tutorial-staging/${{ env.SITE_DIR }}"
49+
working-directory: "${{ github.workspace }}/knative-tutorial-staging"
50+
run: |
51+
git config --global user.email "kamesh.sampath@hotmail.com"
52+
git config --global user.name "Kamesh Sampath"
53+
- name: Setup Node.js for use with actions
54+
uses: actions/setup-node@v1.1.0
55+
with:
56+
version: "12.x"
57+
- name: Deploy to GitHub Pages
58+
working-directory: "${{ github.workspace }}/knative-tutorial-staging"
4959
run: |
50-
git add .
51-
git commit -m "[Staging] Publish Documentation for ${{ github.sha }}"
52-
git push origin 'gh-pages'
60+
npm -g install gh-pages@2.2.0
61+
gh-pages -d gh-pages -x \
62+
--repo "git@github.com/redhat-developer-docs/knative-tutorial-staging"
63+
--dotfiles
64+
-m "Staging Publish"

0 commit comments

Comments
 (0)