Skip to content

Commit

Permalink
ci: docs publish should happen on release
Browse files Browse the repository at this point in the history
Otherwise you could be in a state where the docs are ahead of the
published library
  • Loading branch information
nacho-vazquez committed Jul 14, 2024
1 parent e48ba1b commit 513a63b
Showing 2 changed files with 33 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -99,39 +99,6 @@ jobs:
pnpm exec nx affected -t lint test build
pnpm exec nx affected -t e2e-ci --parallel=1
deploy-docs:
name: '[Merge] Deploy docs to GitHub Pages'
needs: main
if: github.event_name == 'push' && github.ref_name == 'main'
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Check out the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
# Uses the cache generated in the distributed step
- name: Build docs
run: pnpm exec nx build docs-lumberjack-docs-app
- name: Set up GitHub Pages
uses: actions/configure-pages@v4
- name: Upload docs to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: dist/packages/docs/lumberjack-docs-app/
- name: Deploy docs to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

sonarcloud:
name: SonarCloud
needs: main
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -60,3 +60,36 @@ jobs:
branch: ${{ github.ref }}
force: true
tags: true

deploy-docs:
name: '[Merge] Deploy docs to GitHub Pages'
needs: main
if: github.event_name == 'push' && github.ref_name == 'main'
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Check out the source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
# Uses the cache generated in the distributed step
- name: Build docs
run: pnpm exec nx build docs-lumberjack-docs-app
- name: Set up GitHub Pages
uses: actions/configure-pages@v4
- name: Upload docs to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: dist/packages/docs/lumberjack-docs-app/
- name: Deploy docs to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 513a63b

Please sign in to comment.