Skip to content

Commit

Permalink
ci: move the publishing of the docs to the release pipeline to sync t…
Browse files Browse the repository at this point in the history
…he package with the docs (#212)

## PR Checklist

Please check if your PR fulfills the following requirements:

- [x] The commit message follows our guidelines: CONTRIBUTING.md#commit
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

```
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[x] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:
```

## What is the current behavior?

Every time we merge a PR the docs are automatically deployed.

## What is the new behavior?

Docs are deployed only when a manual release is triggered

## Does this PR introduce a breaking change?

```
[ ] Yes
[x] No
```
  • Loading branch information
NachoVazquez authored Jul 14, 2024
1 parent e9d633f commit 02ea92c
Show file tree
Hide file tree
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
Expand Up @@ -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/nonfigure-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
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 02ea92c

Please sign in to comment.