Skip to content

Snapshot

Snapshot #151

Workflow file for this run

name: Snapshot
on: workflow_dispatch
jobs:
publish:
name: Publish snapshot version
runs-on: ubuntu-latest
env:
CI: true
SITE_PREVIEW_PATH: ${{ github.ref_name }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
token: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
- name: Set up pnpm
uses: pnpm/action-setup@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version-file: package.json
- name: Install Dependencies
run: pnpm i
- name: Publish
uses: seek-oss/changesets-snapshot@v0
with:
pre-publish: pnpm prepare-publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: pnpm build:site
env:
BASE_NAME: /braid-design-system/${{ env.SITE_PREVIEW_PATH }}
BRANCH_NAME: ${{ github.ref_name }}
HEAD_BRANCH_NAME: ${{ github.head_ref }}
- name: Deploy preview site
uses: JamesIves/github-pages-deploy-action@881db5376404c5c8d621010bcbec0310b58d5e29 # 4.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: ./site/dist
target-folder: ${{ env.SITE_PREVIEW_PATH }}
commit-message: Preview of `${{ github.ref_name }}`