Skip to content

Fetch docs and deploy preview branch #1

Fetch docs and deploy preview branch

Fetch docs and deploy preview branch #1

name: Fetch docs and deploy preview branch
on: workflow_dispatch
jobs:
deploy-preview:
name: Fetch docs and deploy preview branch
runs-on: ubuntu-latest
environment: deploy
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Pull documents from Notion
run: ./pull_docs.sh --skip-pulling-from-s3
env:
SF_HELP_NOTION_TOKEN: ${{ secrets.SF_HELP_NOTION_TOKEN }}
SF_HELP_NOTION_ROOT_PAGE_ID: ${{ secrets.SF_HELP_NOTION_ROOT_PAGE_ID }}
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update files from Notion"
- name: Build the site
run: ./build.sh
- name: Push changes to preview branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git push -f origin HEAD:preview
- name: Deploy preview to Netlify
run: ./deploy.sh --github-action-preview-subdomain
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}