Skip to content

Commit

Permalink
ci: validate docs (project-copacetic#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
sozercan authored Aug 22, 2023
1 parent ad8085c commit fa9ead6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy docs website to GitHub Pages
name: Generate docs website to GitHub Pages

on:
push:
Expand All @@ -7,13 +7,19 @@ on:
paths:
- '.github/workflows/deploy-docs.yaml'
- 'website/**'
pull_request:
branches:
- main
paths:
- '.github/workflows/deploy-docs.yaml'
- 'website/**'

permissions:
contents: read

jobs:
deploy:
name: Deploy docs website to GitHub Pages
name: Generate docs website to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -48,10 +54,11 @@ jobs:
- run: yarn install --frozen-lockfile
- run: yarn build

# deploy only after PR is merged to main
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'project-copacetic/copacetic'
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
destination_dir: ./website
destination_dir: ./website

0 comments on commit fa9ead6

Please sign in to comment.