Skip to content

Merge pull request #39 from thomasKn/thomas/fv-247-navigation-animation #37

Merge pull request #39 from thomasKn/thomas/fv-247-navigation-animation

Merge pull request #39 from thomasKn/thomas/fv-247-navigation-animation #37

###############
# This Workflow is used to mirror the main branch to a preview branch.
# Each time the main branch is updated, the preview branch will be updated.
# Useful for having a fixed preview URL that can be used by Sanity Studio.
# The SANITY_STUDIO_USE_STEGA environment variable should be set to true for the preview branch.
# Github Worflow permissions should be set to Read and write => https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-the-default-github_token-permissions
# If using Vercel, the Vercel Authentication setting should be disabled => https://vercel.com/docs/security/deployment-protection/methods-to-protect-deployments/vercel-authentication#managing-vercel-authentication
###############
name: Sanity Preview Branch
on:
push:
branches:
- main
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch latest changes
run: git fetch origin main
- name: Push to Mirror Branch
run: |
git checkout -b preview
git push --force origin preview
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}