Skip to content

Modify cookie expiry from session to 1 day #16

Modify cookie expiry from session to 1 day

Modify cookie expiry from session to 1 day #16

Workflow file for this run

name: Deploy to Cloudflare Page Static Site
on:
# Trigger the workflow every time you push to the `main` or `staging` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [main, staging]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
id: extract_branch
- name: Display git branch
shell: bash
run: echo ${{ env.GIT_BRANCH }}
- name: Checkout your repository using git
uses: actions/checkout@v4
with:
ref: ${{ env.STORE_PATH }}
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.14.0
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Install Playwright
run: pnpm install -D @playwright/test@latest
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps chromium
- name: Build Astro Site
run: pnpm run build
- name: Upload dist folder
uses: actions/upload-artifact@v4
with:
path: ./dist
name: dist
- name: Publish to Cloudflare Pages
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: pnpm run deploy