Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
ci: separate build and deploy jobs for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwigoric committed Dec 11, 2023
1 parent fb86cf5 commit d68d161
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/docs-cf-pages-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ env:
WRS_DOCKER_VERSION: 232.10275

jobs:
publish:
build:
runs-on: ubuntu-latest
environment:
name: 'Documentation'
name: 'Build Documentation'
url: ${{ steps.deploy-to-cloudflare-pages.outputs.url }}
permissions:
contents: read
deployments: write

name: Publish to Cloudflare Pages
steps:
Expand Down Expand Up @@ -63,7 +60,30 @@ jobs:
- name: Unzip Writerside artifact
uses: montudor/action-zip@v1
with:
args: unzip -qq artifacts/${{ env.WRS_ARTIFACT }} -d ./built_docs/code
args: unzip -qq artifacts/${{ env.WRS_ARTIFACT }} -d ./built_docs/handbook

- name: Archive documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: built_docs
retention-days: 7

deploy:
runs-on: ubuntu-latest
environment:
name: 'Publish Documentation'
url: ${{ steps.deploy-to-cloudflare-pages.outputs.url }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download documentation
uses: actions/download-artifact@v3
with:
name: docs
path: built_docs

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
Expand All @@ -73,4 +93,4 @@ jobs:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: built_docs
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d68d161

Please sign in to comment.