chore: bump actions/upload-artifact from 3.1.2 to 3.1.3 (#291) #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate docs website to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/deploy-docs.yaml' | |
- 'website/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/deploy-docs.yaml' | |
- 'website/**' | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
name: Generate docs website to GitHub Pages | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
defaults: | |
run: | |
working-directory: website | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- name: Harden Runner | |
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 | |
with: | |
egress-policy: audit | |
- name: Setup Node | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: 16.x | |
- name: Get yarn cache | |
id: yarn-cache | |
run: echo "dir=$(yarn cache dir)" > $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-website- | |
- 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 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/build | |
destination_dir: ./website |