chore(deps): update dependency cypress to v14 #371
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: Deploy PR previews | |
concurrency: preview-${{ github.ref }} | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- closed | |
jobs: | |
deploy-docs-preview: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Install and build | |
if: github.event.action != 'closed' | |
run: | | |
npm ci | |
npm run build | |
npm run build:docs | |
npm pack | |
mkdir -p ./temp/pr-preview/docs-generator | |
cp -r ./public/* ./temp/pr-preview/docs-generator | |
echo "{ \"versions\": [\"v$(npm pkg get version | jq -r)\"], \"latest\": \"v$(npm pkg get version | jq -r)\" }" | tee ./temp/pr-preview/versions.json | |
- name: Determine docs-generator version | |
run: | | |
echo "VERSION=$(npm pkg get version | jq -r)" | tee -a $GITHUB_ENV | |
#FKUI | |
- uses: actions/checkout@v4 | |
with: | |
path: "fkui" | |
repository: "Forsakringskassan/designsystem" | |
- name: Build FKUI documentation | |
if: github.event.action != 'closed' | |
run: | | |
cd fkui | |
npm ci | |
npm install "../forsakringskassan-docs-generator-${VERSION}.tgz" | |
npm install --workspaces "../forsakringskassan-docs-generator-${VERSION}.tgz" | |
npm run build || true | |
npm run build:docs || true | |
mkdir -p ../temp/pr-preview/fkui/ | |
cp -r ./public/* ../temp/pr-preview/fkui/ || true | |
cat << EOF > ../temp/pr-preview/index.html | |
<style> | |
body { | |
padding: 2rem; | |
font-family: sans-serif; | |
} | |
a { | |
background-color: #4a52b6; | |
text-decoration: none; | |
color: white; | |
margin-bottom: 1rem; | |
border-radius: 4px; | |
padding: 0.5rem; | |
display: inline-block; | |
} | |
a:hover { | |
background-color: #3b4292; | |
} | |
</style> | |
<a href="./docs-generator">FK Documentation generator</a> | |
<br> | |
<a href="./fkui">FK Designsystem</a> | |
EOF | |
- name: Deploy docs | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
source-dir: ./temp/pr-preview/ | |
preview-branch: gh-pages | |
umbrella-dir: pr-preview | |
action: auto |