Skip to content

Commit

Permalink
📦 ci(deploy-docs.yml): added build scripts to the workflow (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
prjctimg authored Apr 7, 2024
1 parent a7f0699 commit 68309e5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
Expand All @@ -19,7 +19,6 @@ permissions:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.


jobs:
# Single deploy job since we're just deploying
deploy-preview:
Expand All @@ -28,11 +27,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Build site
run: |
npm install
npm run docs
cd docs/assets && npm install && npm run deploy
- name: Deploy site
uses: JamesIves/github-pages-deploy-action@v4
with:
# Upload directory with assets
folder: ./docs/www
branch: gh-pages
clean-exclude: pr-preview
force: false

38 changes: 19 additions & 19 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ on:
- synchronize
- closed
- reopened

concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and Build
if: github.event.action != 'closed' # skips build step if pr is closed
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and Build
if: github.event.action != 'closed' # skips build step if pr is closed

run: |
npm install
npm run docs
cd docs/assets && npm install && npm run deploy
- name: Deploy PR Preview
uses: rossjrw/[email protected]
with:
token: ${{secrets.GH_PAT}}
preview-branch: ${{ github.ref }}
source-dir: ./docs/www
umbrella-dir: ./docs/pr-preview
action: auto
run: |
npm install
npm run docs
cd docs/assets && npm install && npm run deploy
- name: Deploy PR Preview
uses: rossjrw/[email protected]
with:
token: ${{secrets.GH_PAT}}
preview-branch: ${{ github.ref }}
source-dir: ./docs/www
umbrella-dir: ./docs/pr-preview
action: auto

0 comments on commit 68309e5

Please sign in to comment.