Skip to content

Commit

Permalink
ci(docs): Set documentation to build from previous commit SHA.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmussig committed May 11, 2022
1 parent 3084c75 commit c03f3d5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ on:
- main

jobs:
semantic-release:
semantic_release:
runs-on: ubuntu-latest
outputs:
new_sha: ${{ steps.sha.outputs.SHA }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand All @@ -17,10 +19,16 @@ jobs:
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: get sha
id: sha
run: |
sha_new=$(git rev-parse HEAD)
echo $sha_new
echo "::set-output name=SHA::$sha_new"
documentation:
runs-on: ubuntu-latest
needs: ['semantic-release']
needs: ['semantic_release']
steps:
- uses: actions/setup-python@v2
with:
Expand All @@ -29,7 +37,8 @@ jobs:
# Checkout the main branch to /main
- uses: actions/checkout@v2
with:
path: main
ref: ${{ needs.semantic_release.outputs.new_sha }}
fetch-depth: 0

# Checkout the GitHub pages branch to /gh-pages
- uses: actions/checkout@v2
Expand Down

0 comments on commit c03f3d5

Please sign in to comment.