Skip to content

Commit

Permalink
ci: fix docs publishing workflow (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
aelesbao authored Nov 21, 2023
1 parent 910418e commit 87fcd20
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,20 @@
name: Deploy docs

on:
# Runs on every release
# Runs on every stable release
release:
types: [released]
types: [published]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow manual workflow executions
workflow_dispatch:

# Allow one concurrent deployment
concurrency:
group: "docs"
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -41,9 +34,24 @@ jobs:
- name: Build docs
run: yarn docs
- name: Upload docs folder
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v2
with:
path: "./docs"

deploy:
needs: build

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
pages: write
id-token: write

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

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 87fcd20

Please sign in to comment.