Skip to content

Commit

Permalink
Merge pull request #65 from robotology/action/gh-page
Browse files Browse the repository at this point in the history
Add the gh-pages Workflow
  • Loading branch information
GiulioRomualdi authored Jun 9, 2020
2 parents 8aa7b4d + 0e8c737 commit 7837339
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: GitHub Pages

on:
push:
branches:
- 'master'

jobs:
docs:
name: "Deploy"
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@master
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_GH_PAGES }}
- name: Dependencies
run: |
sudo apt update
sudo apt install -y doxygen graphviz
- name: Check remote
run: git ls-remote --heads --exit-code https://github.com/${{ github.repository }}.git gh-pages

- name: Configure Git
run: |
git config --global push.default upstream
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Clone and rebase
run: |
cd ${GITHUB_WORKSPACE}
git clone [email protected]:${{ github.repository }}.git gh-pages
cd gh-pages
git checkout gh-pages
git rebase master
- name: Build Doxygen
run: |
cd ${GITHUB_WORKSPACE}/gh-pages/doxygen
doxygen ./generate.txt
- name: Commit and push
run: |
cd ${GITHUB_WORKSPACE}/gh-pages
git add .
git commit --amend --no-edit
git push --force-with-lease

0 comments on commit 7837339

Please sign in to comment.