Update SCSS variables from Figma #10
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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: ['*'] | |
pull_request: | |
branches: ['*'] | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Prepare preview directory | |
run: | | |
# Replace slashes with dashes in branch name | |
if [ "${{ github.event_name }}" == "pull_request" ]; then | |
BRANCH_NAME="${{ github.head_ref }}" | |
else | |
BRANCH_NAME="${GITHUB_REF_NAME}" | |
fi | |
# Replace slashes with dashes for safety | |
DEPLOY_PATH="${BRANCH_NAME//\//-}" | |
# Create preview directory structure | |
mkdir -p "preview-out/${DEPLOY_PATH}" | |
cp -r dist/* "preview-out/${DEPLOY_PATH}/" | |
# Copy 404.html to root for routing | |
cp dist/404.html preview-out/ | |
- name: Deploy to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: preview-out | |
keep_files: true | |
publish_branch: gh-pages |