Skip to content

Commit

Permalink
ci: split continuous delivery and documentation workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Dec 15, 2023
1 parent f42e8b2 commit 41584ca
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 32 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,3 @@ jobs:
yarn npm publish --tag ${TAG}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

Docgen:
name: Docgen
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Use Node.js v20
uses: actions/setup-node@v2
with:
node-version: 20
cache: yarn
- name: Install Dependencies
run: yarn --immutable
- name: Build documentation
run: yarn docs
- name: Add static files
run: |
printf "User-agent: *\nDisallow:" > docs/robots.txt
cp .gitignore docs/
cp LICENSE.md docs/
cp README.md docs/
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
49 changes: 49 additions & 0 deletions .github/workflows/static-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy static content to Pages

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
Docgen:
name: Docgen
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Use Node.js v20
uses: actions/setup-node@v2
with:
node-version: 20
cache: yarn
- name: Install Dependencies
run: yarn --immutable
- name: Build documentation
run: yarn docs
- name: Add static files
run: |
printf "User-agent: *\nDisallow:" > docs/robots.txt
cp .gitignore docs/
cp LICENSE.md docs/
cp README.md docs/
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 41584ca

Please sign in to comment.