Skip to content

Commit

Permalink
ci: publish review docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mfal committed Jan 30, 2024
1 parent e5bdd22 commit 638c8cf
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish docs
on:
push:
branches:
- main

permissions:
contents: read
Expand All @@ -16,36 +14,40 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout ⬇️
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
- name: Setup Node 🎛️
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
registry-url: "https://registry.npmjs.org"

- run: yarn install --immutable
- uses: nrwl/nx-set-shas@v4
- if: github.ref != 'refs/heads/main'
- name: Yarn Install 📦️
run: yarn install --immutable
- name: Setup NX 1/2 🎛️
uses: nrwl/nx-set-shas@v4
- name: Setup NX 2/2 🎛
if: github.ref != 'refs/heads/main'
run: git branch --track main origin/main
- run: yarn nx affected -t build --parallel=3
- name: Build 🔨
run: yarn build

- uses: actions/configure-pages@v4
- name: Configure GitHub pages ⚙️
uses: actions/configure-pages@v4
with:
static_site_generator: next

- name: Upload artifact
- name: Upload artifact ⬆️
uses: actions/upload-pages-artifact@v3
with:
path: packages/docs/out

deploy:
environment:
name: github-pages
name: ${{ github.ref_name }}
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
Expand All @@ -55,3 +57,5 @@ jobs:
- name: Publish to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v4
with:
preview: true

0 comments on commit 638c8cf

Please sign in to comment.