diff --git a/.github/workflows-src/partials/build-astro.yml b/.github/workflows-src/partials/build-astro.yml new file mode 100644 index 0000000000..8aef099d09 --- /dev/null +++ b/.github/workflows-src/partials/build-astro.yml @@ -0,0 +1,13 @@ +- uses: actions/setup-node@v4 + with: + node-version: 22 +- run: corepack enable +- run: yarn install --immutable +- uses: actions/cache@v4 + id: site-cache + name: Load rspack cache + with: + path: "packages/documentation-site/.cache" + key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} +- run: yarn build:doc-core + name: Build astro docs diff --git a/.github/workflows-src/partials/build.yml b/.github/workflows-src/partials/build.yml index c6955a794a..1c10aa72bd 100644 --- a/.github/workflows-src/partials/build.yml +++ b/.github/workflows-src/partials/build.yml @@ -3,7 +3,6 @@ node-version: 22 - run: corepack enable - run: yarn install --immutable -# v5 build - uses: actions/cache@v4 id: site-cache name: Load rspack cache diff --git a/.github/workflows-src/pr-preview.yml b/.github/workflows-src/pr-preview.yml index 60b7c3a793..0b3921bb87 100644 --- a/.github/workflows-src/pr-preview.yml +++ b/.github/workflows-src/pr-preview.yml @@ -7,7 +7,7 @@ jobs: SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }} SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }} - GH_PR_NUM: ${{ github.event.number }} + GH_PR_NUM: ${{ github.event.number }} steps: - uses: actions/checkout@v2 # Yes, we really want to checkout the PR @@ -18,3 +18,17 @@ jobs: %build% - run: node .github/upload-preview.js build/patternfly-org/site site name: Upload docs + build-upload-astro: + runs-on: ubuntu-latest + env: + SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }} + SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} + GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }} + GH_PR_NUM: ${{ github.event.number }} + steps: + - uses: actions/checkout@v2 + - run: | + git fetch origin pull/$GH_PR_NUM/head:tmp + git checkout tmp + # Injected by generate-workflows.js + %build-astro% diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 490133d26b..bb0058382b 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -1,4 +1,4 @@ -### WARNING -- this file was generated by generate-workflows +### WARNING -- this file was generated by generate-workflows.js name: pr-preview on: pull_request_target jobs: @@ -21,7 +21,6 @@ jobs: node-version: 22 - run: corepack enable - run: yarn install --immutable - # build - uses: actions/cache@v4 id: site-cache name: Load rspack cache @@ -32,3 +31,29 @@ jobs: name: Build docs - run: node .github/upload-preview.js build/patternfly-org/site site name: Upload docs + build-upload-astro: + runs-on: ubuntu-latest + env: + SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }} + SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} + GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }} + GH_PR_NUM: ${{ github.event.number }} + steps: + - uses: actions/checkout@v2 + - run: | + git fetch origin pull/$GH_PR_NUM/head:tmp + git checkout tmp + # Injected by generate-workflows.js + - uses: actions/setup-node@v4 + with: + node-version: 22 + - run: corepack enable + - run: yarn install --immutable + - uses: actions/cache@v4 + id: site-cache + name: Load rspack cache + with: + path: "packages/documentation-site/.cache" + key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} + - run: yarn build:doc-core + name: Build astro docs