diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index e942a05..1c5bd3e 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -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 @@ -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: @@ -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