This repository has been archived by the owner on Nov 22, 2024. It is now read-only.
Add a changelog entry, upgrade dependencies, bump #177
Workflow file for this run
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: Build docs from a pull request | |
on: | |
pull_request: | |
paths: | |
- attractions/** | |
- docs/** | |
- CHANGELOG.md | |
- MIGRATION_GUIDE.md | |
- package.json | |
- pnpm-lock.yaml | |
jobs: | |
build-docs: | |
name: Build docs | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: docs | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Set up Node 14 📦 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Cache pnpm modules 🗄 | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-pnpm-modules | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- | |
- name: Install pnpm 🧰 | |
uses: pnpm/[email protected] | |
with: | |
version: 6.14.2 | |
- name: Build docs 🔧 | |
env: | |
SAPPER_APP_BASEPATH: attractions/${{ github.event.number }} | |
run: | | |
pnpm install | |
pnpm run export -- --basepath attractions/${{ github.event.number }} | |
- name: Save the PR number 📩 | |
run: echo "${{ github.event.number }}" > ../pr_number.txt | |
# The ".." is to go outside the docs directory | |
- name: Upload the PR number 📤 | |
uses: actions/upload-artifact@v2 | |
with: | |
name: pr_number | |
path: pr_number.txt | |
- name: Upload the built docs 📤 | |
uses: actions/upload-artifact@v2 | |
with: | |
name: docs | |
path: docs/__sapper__/export/attractions/${{ github.event.number }}/ |